summaryrefslogtreecommitdiff
path: root/zebra/zebra_router.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-08-27 15:24:02 -0400
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-10-24 06:54:29 -0400
commit62f20a52ab08c89697c094d4f44df5cf0272499a (patch)
tree864e73d9a8c5034b89edb28ac8ad89d61ca259b4 /zebra/zebra_router.c
parent7f0ea8a4a23f4500421e89268b442cf145d0d75f (diff)
zebra: Move ipset_hash, ipset_entry_hash and iptable_hash into zrouter
These three data structures belong in the `zebra_router` structure as that they do not belong in `struct zebra_ns`. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_router.c')
-rw-r--r--zebra/zebra_router.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/zebra/zebra_router.c b/zebra/zebra_router.c
index 94d7ab1b8c..99d96fd67f 100644
--- a/zebra/zebra_router.c
+++ b/zebra/zebra_router.c
@@ -158,6 +158,13 @@ void zebra_router_terminate(void)
hash_clean(zrouter.rules_hash, zebra_pbr_rules_free);
hash_free(zrouter.rules_hash);
+
+ hash_clean(zrouter.ipset_entry_hash, zebra_pbr_ipset_entry_free),
+ hash_clean(zrouter.ipset_hash, zebra_pbr_ipset_free);
+ hash_free(zrouter.ipset_hash);
+ hash_free(zrouter.ipset_entry_hash);
+ hash_clean(zrouter.iptable_hash, zebra_pbr_iptable_free);
+ hash_free(zrouter.iptable_hash);
}
void zebra_router_init(void)
@@ -167,4 +174,16 @@ void zebra_router_init(void)
zrouter.rules_hash = hash_create_size(8, zebra_pbr_rules_hash_key,
zebra_pbr_rules_hash_equal,
"Rules Hash");
+
+ zrouter.ipset_hash =
+ hash_create_size(8, zebra_pbr_ipset_hash_key,
+ zebra_pbr_ipset_hash_equal, "IPset Hash");
+
+ zrouter.ipset_entry_hash = hash_create_size(
+ 8, zebra_pbr_ipset_entry_hash_key,
+ zebra_pbr_ipset_entry_hash_equal, "IPset Hash Entry");
+
+ zrouter.iptable_hash = hash_create_size(8, zebra_pbr_iptable_hash_key,
+ zebra_pbr_iptable_hash_equal,
+ "IPtable Hash Entry");
}