diff options
author | Donatas Abraitis <donatas.abraitis@gmail.com> | 2022-02-09 12:44:25 +0100 |
---|---|---|
committer | Donatas Abraitis <donatas.abraitis@gmail.com> | 2022-02-10 10:04:03 +0100 |
commit | 1bcf3a96de9923af1ab6c95d4f59f90374015336 (patch) | |
tree | 9c2ad0eaf24972c06001a9d6a327f01e7aafb78b /bgpd/bgp_evpn_vty.c | |
parent | Merge pull request #10549 from idryzhov/bgp-coverity (diff) | |
download | frr-1bcf3a96de9923af1ab6c95d4f59f90374015336.tar.xz frr-1bcf3a96de9923af1ab6c95d4f59f90374015336.zip |
bgpd: Use get/set helpers for attr->lcommunity
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'bgpd/bgp_evpn_vty.c')
-rw-r--r-- | bgpd/bgp_evpn_vty.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/bgpd/bgp_evpn_vty.c b/bgpd/bgp_evpn_vty.c index f377c8352..caf044485 100644 --- a/bgpd/bgp_evpn_vty.c +++ b/bgpd/bgp_evpn_vty.c @@ -1246,17 +1246,23 @@ static int bgp_show_ethernet_vpn(struct vty *vty, struct prefix_rd *prd, if (type == bgp_show_type_lcommunity_exact) { struct lcommunity *lcom = output_arg; - if (!pi->attr->lcommunity || - !lcommunity_cmp( - pi->attr->lcommunity, lcom)) + if (!bgp_attr_get_lcommunity( + pi->attr) || + !lcommunity_cmp( + bgp_attr_get_lcommunity( + pi->attr), + lcom)) continue; } if (type == bgp_show_type_lcommunity) { struct lcommunity *lcom = output_arg; - if (!pi->attr->lcommunity || - !lcommunity_match( - pi->attr->lcommunity, lcom)) + if (!bgp_attr_get_lcommunity( + pi->attr) || + !lcommunity_match( + bgp_attr_get_lcommunity( + pi->attr), + lcom)) continue; } if (type == bgp_show_type_community) { |