Skip to content

Commit

Permalink
Merge pull request #15592 from pguibert6WIND/fix_srte_color
Browse files Browse the repository at this point in the history
bgpd: fix register NHT with appropriate colored ext. community
  • Loading branch information
ton31337 authored Apr 14, 2024
2 parents deef11a + 37488b5 commit cc04847
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bgpd/bgp_attr.h
Original file line number Diff line number Diff line change
Expand Up @@ -517,9 +517,11 @@ static inline void bgp_attr_set_ecommunity(struct attr *attr,
{
attr->ecommunity = ecomm;

if (ecomm)
if (ecomm) {
SET_FLAG(attr->flag, ATTR_FLAG_BIT(BGP_ATTR_EXT_COMMUNITIES));
else
if (ecommunity_select_color(ecomm))
SET_FLAG(attr->flag, ATTR_FLAG_BIT(BGP_ATTR_SRTE_COLOR));
} else
UNSET_FLAG(attr->flag, ATTR_FLAG_BIT(BGP_ATTR_EXT_COMMUNITIES));
}

Expand Down

0 comments on commit cc04847

Please sign in to comment.