summaryrefslogtreecommitdiff
path: root/zebra/zebra_ns.h
diff options
context:
space:
mode:
authorMark Stapp <mjs@voltanet.io>2018-11-12 15:57:03 -0500
committerMark Stapp <mjs@voltanet.io>2018-11-21 10:38:08 -0500
commit62b8bb7a1776ea98e5874a4a057617e335a7f77c (patch)
treebd76e8af2363cff81492e93f132cbc4de019e669 /zebra/zebra_ns.h
parentad6aad4d0bc06f7711d05e1d05576ea25aac04c5 (diff)
zebra: separate netlink socket for dataplane
Use a separate netlink socket for the dataplane's updates, to avoid races between the dataplane pthread and the zebra main pthread. Revise zebra shutdown so that the dataplane netlink socket is cleaned-up later, after all shutdown-time dataplane work has been done. Signed-off-by: Mark Stapp <mjs@voltanet.io>
Diffstat (limited to 'zebra/zebra_ns.h')
-rw-r--r--zebra/zebra_ns.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/zebra/zebra_ns.h b/zebra/zebra_ns.h
index c1a9b41b8d..d3592f8f30 100644
--- a/zebra/zebra_ns.h
+++ b/zebra/zebra_ns.h
@@ -46,8 +46,9 @@ struct zebra_ns {
ns_id_t ns_id;
#ifdef HAVE_NETLINK
- struct nlsock netlink; /* kernel messages */
- struct nlsock netlink_cmd; /* command channel */
+ struct nlsock netlink; /* kernel messages */
+ struct nlsock netlink_cmd; /* command channel */
+ struct nlsock netlink_dplane; /* dataplane channel */
struct thread *t_netlink;
#endif
@@ -62,7 +63,8 @@ struct zebra_ns *zebra_ns_lookup(ns_id_t ns_id);
int zebra_ns_init(void);
int zebra_ns_enable(ns_id_t ns_id, void **info);
int zebra_ns_disabled(struct ns *ns);
-int zebra_ns_disable(ns_id_t ns_id, void **info);
+int zebra_ns_early_shutdown(struct ns *ns);
+int zebra_ns_final_shutdown(struct ns *ns);
int zebra_ns_config_write(struct vty *vty, struct ns *ns);