]> git.puffer.fish Git - matthieu/frr.git/commit
bgpd: Prevent crash when issuing various forms of `bgp no-rib`
authorDonald Sharp <sharpd@nvidia.com>
Thu, 12 May 2022 13:39:27 +0000 (09:39 -0400)
committerDonatas Abraitis <donatas@opensourcerouting.org>
Fri, 13 May 2022 06:06:45 +0000 (09:06 +0300)
commit0ce91cf6f34976cc8433d829803374c83385af14
tree706f8212502cd516fa1613230da7fe1b15f827e8
parentac8a5403c58149728328fb0cc12abe45202c3956
bgpd: Prevent crash when issuing various forms of `bgp no-rib`

The `bgp no-rib` command cycles through all the bgp rib tables
and removes them from zebra.  Modify the code so that FRR notices
that it is attempting to cycle through the safi's that are two level
tables.  In addition these safi's cannot just blindly remove the routes
from the rib as that there are none explicitly.

This code just prevents the crash in bgpd.  It does not properly cycle
through and remove the zebra changes made that are explicit to these afi's.
This should be handled as appropriate by the developers on these safi's when
it becomes important to them.

Fixes: #11178
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
bgpd/bgpd.c
doc/user/bgp.rst