]> 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)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Tue, 11 Apr 2023 06:36:08 +0000 (06:36 +0000)
commit182a164b1e4a784b794331ce0c187651a67bbf90
tree71abc3cedc4ae0c79fbce49466f463928ab91bf3
parent4d57481211ffd8cdd06bddb2a46501c4de831621
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>
(cherry picked from commit 746e0522f3d5c8b1c6d5b698ff8cf861203bd9f6)
bgpd/bgp_vty.c