summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2019-10-02 12:14:13 +0200
committerAnuradha Karuppiah <anuradhak@cumulusnetworks.com>2020-08-18 09:25:06 -0700
commit2d4e4d39b776c0a389712be6cbb0b28cf7aa33ad (patch)
tree3149d9de4c6dea0a3d5a83a3cf247261afc858d1 /include/linux
parent9771da714e63ba050f13a3f1fa2cdee464e97da1 (diff)
zebra, lib: add an internal API to get relative default nsid in other ns
as remind, the netns identifiers are local to a namespace. that is to say that for instance, a vrf <vrfx> will have a netns id value in one netns, and have an other netns id value in one other netns. There is a need for zebra daemon to collect some cross information, like the LINK_NETNSID information from interfaces having link layer in an other network namespace. For that, it is needed to have a global overview instead of a relative overview per namespace. The first brick of this change is an API that sticks to netlink API, that uses NETNSA_TARGET_NSID. from a given vrf vrfX, and a new vrf created vrfY, the API returns the value of nsID from vrfX, inside the new vrf vrfY. The brick also gets the ns id value of default namespace in each other namespace. An additional value in ns.h is offered, that permits to retrieve the default namespace context. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/net_namespace.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/net_namespace.h b/include/linux/net_namespace.h
index 0187c74d88..0ed9dd61d3 100644
--- a/include/linux/net_namespace.h
+++ b/include/linux/net_namespace.h
@@ -16,6 +16,7 @@ enum {
NETNSA_NSID,
NETNSA_PID,
NETNSA_FD,
+ NETNSA_TARGET_NSID,
__NETNSA_MAX,
};