From 3347430b12ecccc4f03fb29111e9621a6e123b3c Mon Sep 17 00:00:00 2001 From: Philippe Guibert Date: Thu, 7 Dec 2017 18:27:31 +0100 Subject: zebra: add the registration mechanism for netns If vrf backend is netns, then the zebra will create its own zebra_ns context for each new netns discovered. As consequence, a routing table, and other contexts will be created for each new namespace discovered. When it is enabled, a populate process will be done, consisting in learning new interfaces and routes, and addresses from other NETNS. Signed-off-by: Philippe Guibert --- lib/ns.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/ns.h') diff --git a/lib/ns.h b/lib/ns.h index fda062e65f..590e1f2c20 100644 --- a/lib/ns.h +++ b/lib/ns.h @@ -79,13 +79,12 @@ extern struct ns_head ns_tree; * - param 2: the address of the user data pointer (the user data * can be stored in or freed from there) */ -extern void ns_add_hook(int, int (*)(ns_id_t, void **)); +extern void ns_add_hook(int type, int (*)(struct ns *)); /* * NS initializer/destructor */ -/* Please add hooks before calling ns_init(). */ -extern void ns_init(void); +extern void ns_init_zebra(void); extern void ns_terminate(void); /* -- cgit v1.2.3