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);