summaryrefslogtreecommitdiffstats
path: root/zebra/main.c
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2018-12-21 16:25:20 +0100
committerPhilippe Guibert <philippe.guibert@6wind.com>2019-01-09 18:31:16 +0100
commitedbc33221c34c2ef2fb942ea8202a85a0c148bf7 (patch)
treeeff7543b0150cddae8672a45a2fa96345e743287 /zebra/main.c
parentMerge pull request #3565 from rhonda/patch-1 (diff)
downloadfrr-edbc33221c34c2ef2fb942ea8202a85a0c148bf7.tar.xz
frr-edbc33221c34c2ef2fb942ea8202a85a0c148bf7.zip
zebra: start the netns notification mechanism after ns initialisation
when zebra is run, by using vrf netns backend mode, then the parser detector of netns is run before forcing the default vrf to a possible value. In that case, there is a possibility that the forced '-o' option will create a second vrf with same name, whereas this option should be there to uniquely have a default vrf with a value. To make things consistent, the forced value will be priorised. Then, the notifier will attempt to create vrf contexts. The expectation is that the creation will fail, due to an already present vrf with same name. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'zebra/main.c')
-rw-r--r--zebra/main.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/zebra/main.c b/zebra/main.c
index 90d3dbc18..b54c36c10 100644
--- a/zebra/main.c
+++ b/zebra/main.c
@@ -407,10 +407,7 @@ int main(int argc, char **argv)
/*
* Initialize NS( and implicitly the VRF module), and make kernel
* routing socket. */
- zebra_ns_init();
- if (vrf_default_name_configured)
- vrf_set_default_name(vrf_default_name_configured,
- true);
+ zebra_ns_init((const char *)vrf_default_name_configured);
zebra_vty_init();
access_list_init();
prefix_list_init();