]> git.puffer.fish Git - mirror/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, 21 Sep 2020 07:17:11 +0000 (09:17 +0200)
commit3f980e083b02214e0760c9997415703e91261093
tree24b89cf9324cb0326abd979e4983d2a91c91e1d8
parent59450c37fdf1a2426b83e6e8cf8a6688fe2b6d83
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