]> git.proxmox.com Git - mirror_frr.git/commitdiff
zebra: delay default vrf name after vrf initialization
authorPhilippe Guibert <philippe.guibert@6wind.com>
Wed, 21 Nov 2018 13:48:10 +0000 (14:48 +0100)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Wed, 21 Nov 2018 16:21:19 +0000 (17:21 +0100)
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 <philippe.guibert@6wind.com>
Acked-by: Nicolas dichtel <nicolas.dichtel@6wind.com>
zebra/main.c

index 2e92a78385df377ff2ad50ae1d8310ba7d66c710..5cea4fa932b0a8b47cad71556d65dac972644cd0 100644 (file)
@@ -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();