]> git.puffer.fish Git - matthieu/frr.git/commit
bgpd: fix crash in bgp instance creation
authorChirag Shah <chirag@nvidia.com>
Sat, 10 Oct 2020 22:09:11 +0000 (15:09 -0700)
committerChirag Shah <chirag@nvidia.com>
Mon, 12 Oct 2020 23:13:59 +0000 (16:13 -0700)
commita5ab756f2483594a19837e0c30f6184cd966940f
tree29a57958f64940b69c019957b29974315691e240
parentfeded4118b89eba5a1629f45cfe623277612e404
bgpd: fix crash in bgp instance creation

In bgp global commands northbound local-as modify callback
check for backend db for checking existing bgp instance.

In an instance where no router bgp with old ASN cleaned up
followed by new bgp instance with new AS is created,
the nb_running_get_entry in validation phase returns stale
bgp reference, which leads to rejection of the router bgp command.

Uncovered via:
toptotest evpn_type5_test_topo1/test_evpn_type5_topo1.py
test_bgp_attributes_for_evpn_address_family_p1

Signed-off-by: Chirag Shah <chirag@nvidia.com>
bgpd/bgp_nb_config.c
bgpd/bgp_vty.c