summaryrefslogtreecommitdiff
path: root/bgpd/bgp_attr_evpn.c
diff options
context:
space:
mode:
authorvivek <vivek@cumulusnetworks.com>2020-03-24 13:50:20 -0700
committervivek <vivek@cumulusnetworks.com>2020-03-30 20:12:31 -0700
commit1207a5bc9bd81a7e7fffe1bfb1904d3ff18d3028 (patch)
tree02f45f41303b9ebc47a89afe214a9bc5804d4c45 /bgpd/bgp_attr_evpn.c
parent4e30bc2bfec5ead773e37388d6f407022570262f (diff)
bgpd: Ability to add/update unique extended communities
Certain extended communities cannot be repeated. An example is the BGP link bandwidth extended community. Enhance the extended community add function to ensure uniqueness, if requested. Note: This commit does not change the lack of uniqueness for any of the already-supported extended communities. Many of them such as the BGP route target can obviously be present multiple times. Others like the Router's MAC should most probably be present only once. The portions of the code which add these may already be structured such that duplicates do not arise. Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Diffstat (limited to 'bgpd/bgp_attr_evpn.c')
-rw-r--r--bgpd/bgp_attr_evpn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bgpd/bgp_attr_evpn.c b/bgpd/bgp_attr_evpn.c
index 7239ddef93..65072088ae 100644
--- a/bgpd/bgp_attr_evpn.c
+++ b/bgpd/bgp_attr_evpn.c
@@ -45,7 +45,7 @@ void bgp_add_routermac_ecom(struct attr *attr, struct ethaddr *routermac)
memcpy(&routermac_ecom.val[2], routermac->octet, ETH_ALEN);
if (!attr->ecommunity)
attr->ecommunity = ecommunity_new();
- ecommunity_add_val(attr->ecommunity, &routermac_ecom);
+ ecommunity_add_val(attr->ecommunity, &routermac_ecom, false, false);
ecommunity_str(attr->ecommunity);
}