zebra: Notice when our route is deleted and re-install.

The code to reinstall self originated routes was not behaving
correctly.  For some reason we were looking for self originated
routes from the kernel to be of type KERNEL.  This was probably
missed when we started installing the route types.  We should
depend on the self originated flag that we determine from
the callback from the kernel.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com.
This commit is contained in:
Donald Sharp 2018-03-31 17:08:21 -04:00
parent 8227cf9333
commit b8faa875f7

View File

@ -2491,8 +2491,7 @@ void rib_delete(afi_t afi, safi_t safi, vrf_id_t vrf_id, int type,
* If we can show that this code path is
* dead then we can remove it.
*/
if (fib && type == ZEBRA_ROUTE_KERNEL
&& CHECK_FLAG(flags, ZEBRA_FLAG_SELFROUTE)) {
if (fib && CHECK_FLAG(flags, ZEBRA_FLAG_SELFROUTE)) {
if (IS_ZEBRA_DEBUG_RIB) {
rnode_debug(
rn, vrf_id,