summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSri Mohana Singamsetty <srimohans@gmail.com>2019-03-11 12:05:30 -0700
committerGitHub <noreply@github.com>2019-03-11 12:05:30 -0700
commit2b38c97fe1ee3140d5b8e4b42082db98df390297 (patch)
treef74f1dbc3254a5fa00476f913ca50fd837fbd675
parentd6426a6eb85f4999cd9dbd1726ec4edbd4d52289 (diff)
parent456a4697e541a9cb7f268f63cfed0466f003381e (diff)
Merge pull request #3909 from AnuradhaKaruppiah/l3-vni-0
bgpd: prevent type-5 route creation if bgp_vrf->l3_vni is 0
-rw-r--r--bgpd/bgp_evpn_vty.c3
-rw-r--r--bgpd/bgp_routemap.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/bgpd/bgp_evpn_vty.c b/bgpd/bgp_evpn_vty.c
index 8437c4024e..fb2d9da533 100644
--- a/bgpd/bgp_evpn_vty.c
+++ b/bgpd/bgp_evpn_vty.c
@@ -3358,7 +3358,8 @@ DEFUN (bgp_evpn_advertise_type5,
}
/* advertise type-5 routes */
- bgp_evpn_advertise_type5_routes(bgp_vrf, afi, safi);
+ if (advertise_type5_routes(bgp_vrf, afi))
+ bgp_evpn_advertise_type5_routes(bgp_vrf, afi, safi);
return CMD_SUCCESS;
}
diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c
index 135c9753f7..c276f5ef7b 100644
--- a/bgpd/bgp_routemap.c
+++ b/bgpd/bgp_routemap.c
@@ -3368,7 +3368,7 @@ static void bgp_route_map_process_update(struct bgp *bgp, const char *rmap_name,
"Processing route_map %s update on advertise type5 route command",
rmap_name);
- if (route_update) {
+ if (route_update && advertise_type5_routes(bgp, afi)) {
bgp_evpn_withdraw_type5_routes(bgp, afi, safi);
bgp_evpn_advertise_type5_routes(bgp, afi, safi);
}