diff options
author | Donatas Abraitis <donatas.abraitis@gmail.com> | 2022-02-04 14:56:20 +0100 |
---|---|---|
committer | Donatas Abraitis <donatas.abraitis@gmail.com> | 2022-02-04 14:56:20 +0100 |
commit | b53e67a389573b9d95a563331752e4e8b729c08f (patch) | |
tree | 46807e2486e0f603cfa8390b404a7698801d49ac /bgpd/bgp_flowspec_vty.c | |
parent | Merge pull request #10481 from mobash-rasool/pim-doc (diff) | |
download | frr-b53e67a389573b9d95a563331752e4e8b729c08f.tar.xz frr-b53e67a389573b9d95a563331752e4e8b729c08f.zip |
bgpd: Use bgp_attr_[sg]et_ecommunity for struct ecommunity
This is an extra work before moving attr->ecommunity to attra_extra struct.
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'bgpd/bgp_flowspec_vty.c')
-rw-r--r-- | bgpd/bgp_flowspec_vty.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/bgpd/bgp_flowspec_vty.c b/bgpd/bgp_flowspec_vty.c index 8873ca5c0..02dcdfcaa 100644 --- a/bgpd/bgp_flowspec_vty.c +++ b/bgpd/bgp_flowspec_vty.c @@ -303,12 +303,13 @@ void route_vty_out_flowspec(struct vty *vty, const struct prefix *p, if (path->attr) ipv6_ecomm = bgp_attr_get_ipv6_ecommunity(path->attr); - if (path->attr && (path->attr->ecommunity || ipv6_ecomm)) { + if (path->attr && (bgp_attr_get_ecommunity(path->attr) || ipv6_ecomm)) { /* Print attribute */ attr = path->attr; - if (attr->ecommunity) - s1 = ecommunity_ecom2str(attr->ecommunity, - ECOMMUNITY_FORMAT_ROUTE_MAP, 0); + if (bgp_attr_get_ecommunity(attr)) + s1 = ecommunity_ecom2str(bgp_attr_get_ecommunity(attr), + ECOMMUNITY_FORMAT_ROUTE_MAP, + 0); if (ipv6_ecomm) s2 = ecommunity_ecom2str( ipv6_ecomm, ECOMMUNITY_FORMAT_ROUTE_MAP, 0); |