]> git.puffer.fish Git - matthieu/frr.git/commit
zebra: dynamically detect vxlan link interfaces in other netns
authorPhilippe Guibert <philippe.guibert@6wind.com>
Mon, 6 Jan 2020 16:39:17 +0000 (17:39 +0100)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Mon, 18 May 2020 12:11:03 +0000 (14:11 +0200)
commitde0ebb25404fe984f084a0d57b7f873618423876
treea64b4dc3e7d1619db9584e27bcf3fe5de20581df
parentee9633ed87f0ff5da1373a42d6c044f0a682c8d3
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>
zebra/zebra_netns_id.c
zebra/zebra_netns_id.h
zebra/zebra_netns_notify.c