]> git.proxmox.com Git - mirror_frr.git/commit - lib/ns.h
zebra: upon startup, a NSID is assigned to default netns
authorPhilippe Guibert <philippe.guibert@6wind.com>
Tue, 16 Jan 2018 12:59:58 +0000 (13:59 +0100)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Tue, 27 Feb 2018 10:11:24 +0000 (11:11 +0100)
commitec31f30d28b65a4820a44ac658e677840ed6f88b
tree12d7828e18031db13e71f2fa0d5f8070246fb966
parente27dec3cf15d627cc26c07f40ded138b0bcc6a0a
zebra: upon startup, a NSID is assigned to default netns

when the netns backend is selected for VRF, the default VRF is being
assigned a NSID. This avoids the need to handle the case where if the
incoming NSID was 0 for a non default VRF, then a specific handling had
to be done to keep 0 value for default VRF.
In most cases, as the first NETNS to get a NSID will be the default VRF,
most probably the default VRF will be assigned to 0, while the other
ones will have their value incremented. On some cases, where the NSID is
already assigned for NETNS, including default VRF, then the default VRF
value will be the one derived from the NSID of default VRF, thus keeping
consistency between VRF IDs and NETNS IDs.
Default NS is attempted to be created. Actually, some VMs may have the
netns feature, but the NS initialisation fails because that folder is
not present.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
lib/ns.c
lib/ns.h
lib/vrf.c
lib/vrf.h
zebra/zebra_netns_id.c
zebra/zebra_netns_id.h
zebra/zebra_ns.c