Mailing List Archive

[PATCH] zebra: Clean up kernel routes in main table on startup
When zebra daemon gets restarted, it is supposed to clean up the kernel routes
in the main table by rib_sweep_table(). However in the previous commit
0d0686f98e64017415071e590bde262f0ab5a4c9 rib_weed_table() is called instead,
which weeds routes not in the main table, while rib_sweep_table() was
commented out by '#if 0'.

This change reverts the call to rib_sweep_table() so that the kernel routes in
the main table can be cleaned up if '-k' parameter is not specified.

The patch has been tested on ppc64 platform by running ospfd and zebra.
---
zebra/zebra_rib.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index 857abcab..44080253 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -3010,7 +3010,6 @@ rib_weed_tables (void)
}
}

-#if 0
/* Delete self installed routes after zebra is relaunched. */
static void
rib_sweep_table (struct route_table *table)
@@ -3036,7 +3035,6 @@ rib_sweep_table (struct route_table *table)
}
}
}
-#endif

/* Sweep all RIB tables. */
void
@@ -3048,8 +3046,8 @@ rib_sweep_route (void)
for (iter = vrf_first (); iter != VRF_ITER_INVALID; iter = vrf_next (iter))
if ((zvrf = vrf_iter2info (iter)) != NULL)
{
- rib_weed_table (zvrf->table[AFI_IP][SAFI_UNICAST]);
- rib_weed_table (zvrf->table[AFI_IP6][SAFI_UNICAST]);
+ rib_sweep_table (zvrf->table[AFI_IP][SAFI_UNICAST]);
+ rib_sweep_table (zvrf->table[AFI_IP6][SAFI_UNICAST]);
}
}

--
2.17.2 (Apple Git-113)

_______________________________________________
Quagga-dev mailing list
Quagga-dev@lists.quagga.net
https://lists.quagga.net/mailman/listinfo/quagga-dev