X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=bgpd%2Fbgp_routemap.c;h=89774875b67c4b7698075b1b81942e5e785e6c6e;hb=f3634202613ce5d492582567a505ee494e6dacb6;hp=c42e3c9b9496c7c71934dc94024edbd262eb7150;hpb=c400ebde1c04fef51b7645508013ed611eab93a7;p=mirror_frr.git diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c index c42e3c9b9..89774875b 100644 --- a/bgpd/bgp_routemap.c +++ b/bgpd/bgp_routemap.c @@ -1589,7 +1589,7 @@ route_match_ecommunity(void *rule, const struct prefix *prefix, void *object) if (!list) return RMAP_NOMATCH; - if (ecommunity_list_match(path->attr->ecommunity, list)) + if (ecommunity_list_match(bgp_attr_get_ecommunity(path->attr), list)) return RMAP_MATCH; return RMAP_NOMATCH; @@ -2590,7 +2590,7 @@ route_set_ecommunity(void *rule, const struct prefix *prefix, void *object) if (rcs->none) { attr->flag &= ~(ATTR_FLAG_BIT(BGP_ATTR_EXT_COMMUNITIES)); - attr->ecommunity = NULL; + bgp_attr_set_ecommunity(attr, NULL); return RMAP_OKAY; } @@ -2598,7 +2598,7 @@ route_set_ecommunity(void *rule, const struct prefix *prefix, void *object) return RMAP_OKAY; /* We assume additive for Extended Community. */ - old_ecom = path->attr->ecommunity; + old_ecom = bgp_attr_get_ecommunity(path->attr); if (old_ecom) { new_ecom = @@ -2614,7 +2614,7 @@ route_set_ecommunity(void *rule, const struct prefix *prefix, void *object) new_ecom = ecommunity_dup(rcs->ecom); /* will be intern()'d or attr_flush()'d by bgp_update_main() */ - path->attr->ecommunity = new_ecom; + bgp_attr_set_ecommunity(path->attr, new_ecom); path->attr->flag |= ATTR_FLAG_BIT(BGP_ATTR_EXT_COMMUNITIES); @@ -2764,7 +2764,7 @@ route_set_ecommunity_lb(void *rule, const struct prefix *prefix, void *object) PEER_FLAG_DISABLE_LINK_BW_ENCODING_IEEE)); /* add to route or merge with existing */ - old_ecom = path->attr->ecommunity; + old_ecom = bgp_attr_get_ecommunity(path->attr); if (old_ecom) { new_ecom = ecommunity_dup(old_ecom); ecommunity_add_val(new_ecom, &lb_eval, true, true); @@ -2778,7 +2778,7 @@ route_set_ecommunity_lb(void *rule, const struct prefix *prefix, void *object) } /* new_ecom will be intern()'d or attr_flush()'d in call stack */ - path->attr->ecommunity = new_ecom; + bgp_attr_set_ecommunity(path->attr, new_ecom); path->attr->flag |= ATTR_FLAG_BIT(BGP_ATTR_EXT_COMMUNITIES); /* Mark that route-map has set link bandwidth; used in attribute