]> git.proxmox.com Git - mirror_frr.git/blobdiff - zebra/zebra_router.c
zebra: Move rules_hash to zrouter
[mirror_frr.git] / zebra / zebra_router.c
index 1116848a89b462442f03a016a51cb776acb1e0cb..94d7ab1b8cd66234e7c5cc914e24dd3e047ae24f 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "zebra_router.h"
 #include "zebra_memory.h"
+#include "zebra_pbr.h"
 
 struct zebra_router zrouter;
 
@@ -154,9 +155,16 @@ void zebra_router_terminate(void)
                RB_REMOVE(zebra_router_table_head, &zrouter.tables, zrt);
                zebra_router_free_table(zrt);
        }
+
+       hash_clean(zrouter.rules_hash, zebra_pbr_rules_free);
+       hash_free(zrouter.rules_hash);
 }
 
 void zebra_router_init(void)
 {
        zrouter.l3vni_table = NULL;
+
+       zrouter.rules_hash = hash_create_size(8, zebra_pbr_rules_hash_key,
+                                             zebra_pbr_rules_hash_equal,
+                                             "Rules Hash");
 }