]> git.puffer.fish Git - matthieu/frr.git/commit
bgpd: Do not allow a `no router bgp XXX` when autoimport is happening
authorDonald Sharp <sharpd@nvidia.com>
Mon, 10 Apr 2023 18:04:27 +0000 (14:04 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Mon, 10 Apr 2023 18:14:01 +0000 (14:14 -0400)
commit746e0522f3d5c8b1c6d5b698ff8cf861203bd9f6
tree5937f69c0af21ae7019a4539d03076c70c630f78
parent5a7c43c77ed27522e1e655795d5451c888abb10e
bgpd: Do not allow a `no router bgp XXX` when autoimport is happening

When we have these sequence of events causing a crash in
evpn_type5_test_topo1:

(A) no router bgp vrf RED 100
   this schedules for deletion the vrf RED instance
(B) a l3vni change event from zebra
   this creates a bgp instance for VRF RED in some cases
   additionally it auto imports evpn routes into VRF RED
   Please note this is desired behavior to allow for the
   auto importation of evpn vrf routes
(C) no router bgp 100
   The code was allowing the deletion of the default
   instance and causing tests to crash.

Effectively the test in bgp_vty to allow/dissallow
the removal of the default instance was not correct
for the case when (B) happens.

Let's just not allow the command to succeed in this case as that
the test was wrong.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
bgpd/bgp_vty.c