summaryrefslogtreecommitdiff
path: root/zebra/main.c
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2017-12-13 11:04:31 +0100
committerPhilippe Guibert <philippe.guibert@6wind.com>2018-02-27 11:11:24 +0100
commite27dec3cf15d627cc26c07f40ded138b0bcc6a0a (patch)
treeee0111790a084d52be8210bf75a532679ed6543b /zebra/main.c
parent05895ad0be6c8fadcd895c3b1aa137b89791fbde (diff)
zebra: collect and get netnamespaces information
upon zebra initialisation, and upon further netnamespace creation, the the netnamespaces are created and a vrf associated to the netnamespace is created. By convention, the name of the netns will be the same as the VRF. Add a stub routine that returns a fake ns identifier, in case netlink ( linux machines) is not available. Also, upon each newly discovered NETNS, a NSID id being generated, either by relying on kernel NSID feature, or by generating locally the NSID ( see previous commit for more information). Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'zebra/main.c')
-rw-r--r--zebra/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/zebra/main.c b/zebra/main.c
index 73e5f1290d..3353290816 100644
--- a/zebra/main.c
+++ b/zebra/main.c
@@ -47,6 +47,7 @@
#include "zebra/redistribute.h"
#include "zebra/zebra_mpls.h"
#include "zebra/label_manager.h"
+#include "zebra/zebra_netns_notify.h"
#define ZEBRA_PTM_SUPPORT
@@ -140,6 +141,7 @@ static void sigint(void)
vrf_terminate();
ns_walk_func(zebra_ns_disabled);
+ zebra_ns_notify_close();
access_list_reset();
prefix_list_reset();