From 53af0706e2175111ccf94d8505f846a3b2cda467 Mon Sep 17 00:00:00 2001 From: Philippe Guibert Date: Wed, 21 Nov 2018 14:48:10 +0100 Subject: [PATCH] zebra: delay default vrf name after vrf initialization the vrf context was not created at previous location of the call. The call is done after vrf initialisation. PR=61513 Signed-off-by: Philippe Guibert Acked-by: Nicolas dichtel --- zebra/main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/zebra/main.c b/zebra/main.c index 2e92a7838..5cea4fa93 100644 --- a/zebra/main.c +++ b/zebra/main.c @@ -256,6 +256,7 @@ int main(int argc, char **argv) { // int batch_mode = 0; char *zserv_path = NULL; + char *vrf_default_name_configured = NULL; /* Socket to external label manager */ char *lblmgr_path = NULL; struct sockaddr_storage dummy; @@ -336,7 +337,7 @@ int main(int argc, char **argv) } break; case 'o': - vrf_set_default_name(optarg, true); + vrf_default_name_configured = optarg; break; case 'z': zserv_path = optarg; @@ -402,7 +403,9 @@ 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_vty_init(); access_list_init(); prefix_list_init(); -- 2.39.5