summaryrefslogtreecommitdiff
path: root/zebra/zebra_router.c
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2018-12-06 09:03:12 +0100
committerPhilippe Guibert <philippe.guibert@6wind.com>2018-12-17 12:09:52 +0100
commit6548050a858b4d9bad54b96068c6966e491e8cf4 (patch)
treede06113426c625dd99ccf5a6d159b3a398b698e6 /zebra/zebra_router.c
parenta8dfbac67bee2b55c34a2b57a4b223042e80afbd (diff)
zebra: avoid initialising more than one the l3vni hash structure
the l3vni structure is allocated only once, since that structure is only used for default netns. For that, move the initialisation part is moved to a proper place, where there is no risk of attempting to initialise it more than once, even when vrf backend is netns. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'zebra/zebra_router.c')
-rw-r--r--zebra/zebra_router.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/zebra/zebra_router.c b/zebra/zebra_router.c
index afe3c708a0..2e1c69fb92 100644
--- a/zebra/zebra_router.c
+++ b/zebra/zebra_router.c
@@ -24,6 +24,7 @@
#include "zebra_router.h"
#include "zebra_memory.h"
#include "zebra_pbr.h"
+#include "zebra_vxlan.h"
struct zebra_router zrouter;
@@ -157,6 +158,7 @@ void zebra_router_terminate(void)
zebra_router_free_table(zrt);
}
+ zebra_vxlan_disable();
hash_clean(zrouter.rules_hash, zebra_pbr_rules_free);
hash_free(zrouter.rules_hash);
@@ -170,8 +172,7 @@ void zebra_router_terminate(void)
void zebra_router_init(void)
{
- zrouter.l3vni_table = NULL;
-
+ zebra_vxlan_init();
zrouter.rules_hash = hash_create_size(8, zebra_pbr_rules_hash_key,
zebra_pbr_rules_hash_equal,
"Rules Hash");