summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgp_evpn.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/bgpd/bgp_evpn.c b/bgpd/bgp_evpn.c
index 4d02e39ae..6c77f18f3 100644
--- a/bgpd/bgp_evpn.c
+++ b/bgpd/bgp_evpn.c
@@ -505,7 +505,9 @@ static void unmap_vni_from_rt(struct bgp *bgp, struct bgpevpn *vpn,
static void form_auto_rt(struct bgp *bgp, vni_t vni, struct list *rtl)
{
struct ecommunity_val eval;
- struct ecommunity *ecomadd;
+ struct ecommunity *ecomadd, *ecom;
+ bool ecom_found = false;
+ struct listnode *node;
if (bgp->advertise_autort_rfc8365)
vni |= EVPN_AUTORT_VXLAN;
@@ -513,7 +515,12 @@ static void form_auto_rt(struct bgp *bgp, vni_t vni, struct list *rtl)
ecomadd = ecommunity_new();
ecommunity_add_val(ecomadd, &eval);
- listnode_add_sort(rtl, ecomadd);
+ for (ALL_LIST_ELEMENTS_RO(rtl, node, ecom))
+ if (ecommunity_cmp(ecomadd, ecom))
+ ecom_found = true;
+
+ if (!ecom_found)
+ listnode_add_sort(rtl, ecomadd);
}
/*
@@ -5803,6 +5810,9 @@ int bgp_evpn_local_vni_add(struct bgp *bgp, vni_t vni,
It needs to be conveyed again to zebra */
bgp_zebra_advertise_gw_macip(bgp, vpn->advertise_gw_macip, vpn->vni);
+ /* advertise svi mac-ip knob to zebra */
+ bgp_zebra_advertise_svi_macip(bgp, vpn->advertise_svi_macip, vpn->vni);
+
return 0;
}