summaryrefslogtreecommitdiff
path: root/zebra/zebra_netns_id.h
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2020-01-06 17:39:17 +0100
committerPhilippe Guibert <philippe.guibert@6wind.com>2020-05-18 14:11:03 +0200
commitde0ebb25404fe984f084a0d57b7f873618423876 (patch)
treea64b4dc3e7d1619db9584e27bcf3fe5de20581df /zebra/zebra_netns_id.h
parentee9633ed87f0ff5da1373a42d6c044f0a682c8d3 (diff)
zebra: dynamically detect vxlan link interfaces in other netns
this is used when parsing the newly network namespaces. actually, to track the link of some interfaces like vxlan interfaces, both link index and link nsid are necessary. if a vxlan interface is moved to a new netns, the link information is in the default network namespace, then LINK_NSID is the value of the netns by default in the new netns. That value of the default netns in the new netns is not known, because the system does not automatically assign an NSID of default network namespace in the new netns. Now a new NSID of default netns, seen from that new netns, is created. This permits to store at netns creation the default netns relative value for further usage. Because the default netns value is set from the new netns perspective, it is not needed anymore to use the NETNSA_TARGET_NSID attribute only available in recent kernels. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'zebra/zebra_netns_id.h')
-rw-r--r--zebra/zebra_netns_id.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/zebra/zebra_netns_id.h b/zebra/zebra_netns_id.h
index 215d627b7b..dd9eab18e0 100644
--- a/zebra/zebra_netns_id.h
+++ b/zebra/zebra_netns_id.h
@@ -24,10 +24,8 @@
extern "C" {
#endif
-extern ns_id_t zebra_ns_id_get(const char *netnspath);
+extern ns_id_t zebra_ns_id_get(const char *netnspath, int fd);
extern ns_id_t zebra_ns_id_get_default(void);
-extern ns_id_t zebra_ns_id_get_relative_value(ns_id_t ns_read,
- ns_id_t target_nsid);
#ifdef __cplusplus
}