diff options
author | Philippe Guibert <philippe.guibert@6wind.com> | 2017-12-13 11:04:31 +0100 |
---|---|---|
committer | Philippe Guibert <philippe.guibert@6wind.com> | 2018-02-27 11:11:24 +0100 |
commit | e27dec3cf15d627cc26c07f40ded138b0bcc6a0a (patch) | |
tree | ee0111790a084d52be8210bf75a532679ed6543b /zebra/zebra_ns.c | |
parent | zebra: upon NS creation, collect the NSID via netlink (diff) | |
download | frr-e27dec3cf15d627cc26c07f40ded138b0bcc6a0a.tar.xz frr-e27dec3cf15d627cc26c07f40ded138b0bcc6a0a.zip |
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/zebra_ns.c')
-rw-r--r-- | zebra/zebra_ns.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/zebra/zebra_ns.c b/zebra/zebra_ns.c index 02fc2b184..50551c9b3 100644 --- a/zebra/zebra_ns.c +++ b/zebra/zebra_ns.c @@ -33,6 +33,7 @@ #include "rt.h" #include "zebra_vxlan.h" #include "debug.h" +#include "zebra_netns_notify.h" DEFINE_MTYPE(ZEBRA, ZEBRA_NS, "Zebra Name Space") @@ -249,6 +250,8 @@ int zebra_ns_init(void) ns_add_hook(NS_ENABLE_HOOK, zebra_ns_enabled); ns_add_hook(NS_DISABLE_HOOK, zebra_ns_disabled); ns_add_hook(NS_DELETE_HOOK, zebra_ns_delete); + zebra_ns_notify_parse(); + zebra_ns_notify_init(); } return 0; } |