]> git.proxmox.com Git - mirror_frr.git/blobdiff - watchfrr/watchfrr_vty.c
watchfrr: Allow an integrated config to work within a namespace
[mirror_frr.git] / watchfrr / watchfrr_vty.c
index eda4f5d516bf3785ea2ca174ddad88bb64e62d0e..1492ee37b600073b443cf3d2aea8eba5e39657a2 100644 (file)
@@ -105,7 +105,10 @@ DEFUN(config_write_integrated,
 
        /* don't allow the user to pass parameters, we're root here!
         * should probably harden vtysh at some point too... */
-       execl(VTYSH_BIN_PATH, "vtysh", "-w", NULL);
+       if (pathspace)
+               execl(VTYSH_BIN_PATH, "vtysh", "-N", pathspace, "-w", NULL);
+       else
+               execl(VTYSH_BIN_PATH, "vtysh", "-w", NULL);
 
        /* unbuffered write; we just messed with stdout... */
        char msg[512];