]> git.proxmox.com Git - mirror_frr.git/blobdiff - zebra/zebra_router.c
Merge pull request #4365 from adharkar/frr-master-fpm_rtm_table
[mirror_frr.git] / zebra / zebra_router.c
index 9e09cbca3fb546efa986f93e9c4b56be956dd9a0..610d51d3ea34b0c666ea0a70ed7b60aba377d6bd 100644 (file)
@@ -30,7 +30,9 @@
 #include "zebra_vxlan.h"
 #include "zebra_mlag.h"
 
-struct zebra_router zrouter;
+struct zebra_router zrouter = {
+       .multipath_num = MULTIPATH_NUM,
+};
 
 static inline int
 zebra_router_table_entry_compare(const struct zebra_router_table *e1,
@@ -117,19 +119,6 @@ struct route_table *zebra_router_get_table(struct zebra_vrf *zvrf,
        return zrt->table;
 }
 
-unsigned long zebra_router_score_proto(uint8_t proto, unsigned short instance)
-{
-       struct zebra_router_table *zrt;
-       unsigned long cnt = 0;
-
-       RB_FOREACH (zrt, zebra_router_table_head, &zrouter.tables) {
-               if (zrt->ns_id != NS_DEFAULT)
-                       continue;
-               cnt += rib_score_proto_table(proto, instance, zrt->table);
-       }
-       return cnt;
-}
-
 void zebra_router_show_table_summary(struct vty *vty)
 {
        struct zebra_router_table *zrt;
@@ -202,10 +191,8 @@ void zebra_router_terminate(void)
 {
        struct zebra_router_table *zrt, *tmp;
 
-       RB_FOREACH_SAFE (zrt, zebra_router_table_head, &zrouter.tables, tmp) {
-               RB_REMOVE(zebra_router_table_head, &zrouter.tables, zrt);
+       RB_FOREACH_SAFE (zrt, zebra_router_table_head, &zrouter.tables, tmp)
                zebra_router_free_table(zrt);
-       }
 
        work_queue_free_and_null(&zrouter.ribq);
        meta_queue_free(zrouter.mq);
@@ -228,7 +215,6 @@ void zebra_router_init(void)
 {
        zrouter.sequence_num = 0;
 
-       zrouter.rtm_table_default = 0;
        zrouter.packets_to_process = ZEBRA_ZAPI_PACKETS_TO_PROCESS;
 
        zebra_vxlan_init();