zebra: Cleanup dead function rib_weed_table

the rib_wib_table function was uncalled by anyone remove
and additionally remove it's static function it called.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2018-03-16 00:07:45 -04:00
parent 95a29032bc
commit ea7637ccd4
3 changed files with 0 additions and 36 deletions

View File

@ -351,9 +351,6 @@ int main(int argc, char **argv)
*/
frr_config_fork();
/* Clean up rib -- before fork (?) */
/* rib_weed_tables (); */
/* After we have successfully acquired the pidfile, we can be sure
* about being the only copy of zebra process, which is submitting
* changes to the FIB.

View File

@ -324,7 +324,6 @@ extern struct route_entry *rib_match_ipv4_multicast(vrf_id_t vrf_id,
extern struct route_entry *rib_lookup_ipv4(struct prefix_ipv4 *, vrf_id_t);
extern void rib_update(vrf_id_t, rib_update_event_t);
extern void rib_weed_tables(void);
extern void rib_sweep_route(void);
extern void rib_sweep_table(struct route_table *);
extern void rib_close_table(struct route_table *);

View File

@ -2703,38 +2703,6 @@ void rib_update(vrf_id_t vrf_id, rib_update_event_t event)
rib_update_table(table, event);
}
/* Remove all routes which comes from non main table. */
static void rib_weed_table(struct route_table *table)
{
struct route_node *rn;
struct route_entry *re;
struct route_entry *next;
if (table)
for (rn = route_top(table); rn; rn = srcdest_route_next(rn))
RNODE_FOREACH_RE_SAFE (rn, re, next) {
if (CHECK_FLAG(re->status, ROUTE_ENTRY_REMOVED))
continue;
if (re->table != zebrad.rtm_table_default
&& re->table != RT_TABLE_MAIN)
rib_delnode(rn, re);
}
}
/* Delete all routes from non main table. */
void rib_weed_tables(void)
{
struct vrf *vrf;
struct zebra_vrf *zvrf;
RB_FOREACH (vrf, vrf_id_head, &vrfs_by_id)
if ((zvrf = vrf->info) != NULL) {
rib_weed_table(zvrf->table[AFI_IP][SAFI_UNICAST]);
rib_weed_table(zvrf->table[AFI_IP6][SAFI_UNICAST]);
}
}
/* Delete self installed routes after zebra is relaunched. */
void rib_sweep_table(struct route_table *table)
{