]> git.puffer.fish Git - matthieu/frr.git/commitdiff
vtysh: don't collect config from watchfrr
authorDavid Lamparter <equinox@opensourcerouting.org>
Tue, 15 Aug 2017 11:43:50 +0000 (13:43 +0200)
committerDavid Lamparter <equinox@opensourcerouting.org>
Tue, 15 Aug 2017 11:43:50 +0000 (13:43 +0200)
This results in some hardcoded watchfrr logging config ending up in the
integrated config otherwise.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
vtysh/vtysh.c

index 6255726c471c142e27a742ae903c1391077d937f..f971c171bc328afcc5dfbab5b8bc2c033cf98570 100644 (file)
@@ -250,6 +250,13 @@ static int vtysh_client_execute(struct vtysh_client *head_client,
 
 static void vtysh_client_config(struct vtysh_client *head_client, char *line)
 {
+       /* watchfrr currently doesn't load any config, and has some hardcoded
+        * settings that show up in "show run".  skip it here (for now at
+        * least) so we don't get that mangled up in config-write.
+        */
+       if (head_client->flag == VTYSH_WATCHFRR)
+               return;
+
        vtysh_client_run_all(head_client, line, 1, NULL,
                             vtysh_config_parse_line, NULL);
 }