diff options
| author | Mitesh Kanjariya <mitesh@marvel-07.cumulusnetworks.com> | 2017-10-14 21:12:06 -0700 |
|---|---|---|
| committer | Mitesh Kanjariya <mitesh@marvel-07.cumulusnetworks.com> | 2017-12-14 10:57:06 -0800 |
| commit | 30a30f572724af99d0cb9a997e970a28f8c64e12 (patch) | |
| tree | ec13aceaca50bc4e4c480b818392ba74647eda9f | |
| parent | 1eb8800250b0d162ee9a4c831cf8d7b652e3ac84 (diff) | |
bgpd: only install mac_ip routes in vrf
Signed-off-by: Mitesh Kanjariya<mitesh@cumulusnetworks.com>
| -rw-r--r-- | bgpd/bgp_evpn.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/bgpd/bgp_evpn.c b/bgpd/bgp_evpn.c index 5f57a69310..66a7be910e 100644 --- a/bgpd/bgp_evpn.c +++ b/bgpd/bgp_evpn.c @@ -1597,7 +1597,7 @@ static int uninstall_evpn_route_entry_in_vrf(struct bgp *bgp_vrf, ip_prefix_from_type2_prefix(evp, pp); if (bgp_debug_zebra(NULL)) { - zlog_debug("Uninstalling evpn prefix %s as ip prefix %s in vrf %s", + zlog_debug("uninstalling evpn prefix %s as ip prefix %s in vrf %s", prefix2str(evp, buf, sizeof(buf)), prefix2str(pp, buf1, sizeof(buf)), vrf_id_to_name(bgp_vrf->vrf_id)); @@ -2039,6 +2039,11 @@ static int install_uninstall_route_in_vrfs(struct bgp *bgp_def, afi_t afi, if (!(evp->prefix.route_type == BGP_EVPN_MAC_IP_ROUTE)) return 0; + /* if not a mac+ip route skip this route */ + if (!(IS_EVPN_PREFIX_IPADDR_V4(evp) || + IS_EVPN_PREFIX_IPADDR_V6(evp))) + return 0; + for (ALL_LIST_ELEMENTS(vrfs, node, nnode, bgp_vrf)) { int ret; |
