]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: Cleanup dead function rib_weed_table
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 16 Mar 2018 04:07:45 +0000 (00:07 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 16 Mar 2018 14:20:32 +0000 (10:20 -0400)
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>
zebra/main.c
zebra/rib.h
zebra/zebra_rib.c

index 00d853ea26d755e17e54652b9d5d3ee107cfede0..b0a19c5aa559791e5004e39201e83af56c52d33c 100644 (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.
index 44e0a9ce40e0653188a3684f6c5f06d43c697eef..b244bde9b96cc771d9c838d8ab18d8726fbfac79 100644 (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 *);
index 73b20320ada698036fef384098acc4ba8d616ca1..bba0f818683b2dec8a841a6c938eef876465f1a7 100644 (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)
 {