diff options
author | Sri Mohana Singamsetty <srimohans@gmail.com> | 2022-05-19 18:38:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-19 18:38:10 +0200 |
commit | 93480825fb6aa9241a1cdafc1c23729732fb23ee (patch) | |
tree | ec0376808014b2a9f420dd8c798d9efdaf12e52d /bgpd | |
parent | Merge pull request #11210 from anlancs/fix/zebra-leak-vtp (diff) | |
parent | bgpd: remove unnecessary check for evpn (diff) | |
download | frr-93480825fb6aa9241a1cdafc1c23729732fb23ee.tar.xz frr-93480825fb6aa9241a1cdafc1c23729732fb23ee.zip |
Merge pull request #11204 from anlancs/fix/bgpd-check-vnihash
bgpd: remove unnecessary check for evpn
Diffstat (limited to 'bgpd')
-rw-r--r-- | bgpd/bgp_evpn_vty.c | 7 | ||||
-rw-r--r-- | bgpd/bgp_vty.c | 2 |
2 files changed, 2 insertions, 7 deletions
diff --git a/bgpd/bgp_evpn_vty.c b/bgpd/bgp_evpn_vty.c index 32dc2a785..d94dcdd36 100644 --- a/bgpd/bgp_evpn_vty.c +++ b/bgpd/bgp_evpn_vty.c @@ -2256,9 +2256,6 @@ static struct bgpevpn *evpn_create_update_vni(struct bgp *bgp, vni_t vni) struct bgpevpn *vpn; struct in_addr mcast_grp = {INADDR_ANY}; - if (!bgp->vnihash) - return NULL; - vpn = bgp_evpn_lookup_vni(bgp, vni); if (!vpn) { /* Check if this L2VNI is already configured as L3VNI */ @@ -2290,8 +2287,6 @@ static struct bgpevpn *evpn_create_update_vni(struct bgp *bgp, vni_t vni) */ static void evpn_delete_vni(struct bgp *bgp, struct bgpevpn *vpn) { - assert(bgp->vnihash); - if (!is_vni_live(vpn)) { bgp_evpn_free(bgp, vpn); return; @@ -6291,7 +6286,7 @@ void bgp_config_write_evpn_info(struct vty *vty, struct bgp *bgp, afi_t afi, if (bgp->advertise_all_vni) vty_out(vty, " advertise-all-vni\n"); - if (bgp->vnihash) { + if (hashcount(bgp->vnihash)) { struct list *vnilist = hash_to_list(bgp->vnihash); struct listnode *ln; struct bgpevpn *data; diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 9e22c6cdb..9cfec0fe2 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -1554,7 +1554,7 @@ DEFUN (no_router_bgp, BGP_L2VPN_EVPN_ADV_IPV6_UNICAST) || CHECK_FLAG(tmp_bgp->af_flags[AFI_L2VPN][SAFI_EVPN], BGP_L2VPN_EVPN_ADV_IPV6_UNICAST_GW_IP))) || - (tmp_bgp->vnihash && hashcount(tmp_bgp->vnihash))) { + (hashcount(tmp_bgp->vnihash))) { vty_out(vty, "%% Cannot delete default BGP instance. Dependent VRF instances exist\n"); return CMD_WARNING_CONFIG_FAILED; |