]> git.puffer.fish Git - mirror/frr.git/commitdiff
vtysh: add watchquagga to target list
authorDavid Lamparter <equinox@opensourcerouting.org>
Tue, 8 Nov 2016 18:41:48 +0000 (19:41 +0100)
committerDavid Lamparter <equinox@opensourcerouting.org>
Wed, 9 Nov 2016 13:29:45 +0000 (14:29 +0100)
Also tag some commands as VTYSH_REALLYALL; these are absolutely
neccessary for correct vtysh operation and will cause "interesting"
breakage if not present on all daemons.

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

index c99ba222d6d7f8823c8edb20c9b740df870378f0..4032a447cc95da7dba8355d375883d655528e276 100755 (executable)
@@ -1735,6 +1735,7 @@ AC_DEFINE_UNQUOTED(OSPF6_VTYSH_PATH, "$quagga_statedir/ospf6d.vty",ospf6d vty so
 AC_DEFINE_UNQUOTED(LDP_VTYSH_PATH, "$quagga_statedir/ldpd.vty",ldpd vty socket)
 AC_DEFINE_UNQUOTED(ISIS_VTYSH_PATH, "$quagga_statedir/isisd.vty",isisd vty socket)
 AC_DEFINE_UNQUOTED(PIM_VTYSH_PATH, "$quagga_statedir/pimd.vty",pimd vty socket)
+AC_DEFINE_UNQUOTED(WATCHQUAGGA_VTYSH_PATH, "$quagga_statedir/watchquagga.vty",watchquagga vty socket)
 AC_DEFINE_UNQUOTED(DAEMON_VTY_DIR, "$quagga_statedir",daemon vty directory)
 
 dnl autoconf does this, but it does it too late...
index ed6c892ba4b05bdb522df70c6b22a61f7abb509d..9888c35346c13e7f33c31679881dccc4671919d9 100644 (file)
@@ -73,6 +73,7 @@ struct vtysh_client vtysh_client[] =
   { .fd = -1, .name = "bgpd", .flag = VTYSH_BGPD, .path = BGP_VTYSH_PATH, .next = NULL},
   { .fd = -1, .name = "isisd", .flag = VTYSH_ISISD, .path = ISIS_VTYSH_PATH, .next = NULL},
   { .fd = -1, .name = "pimd", .flag = VTYSH_PIMD, .path = PIM_VTYSH_PATH, .next = NULL},
+  { .fd = -1, .name = "watchquagga", .flag = VTYSH_WATCHQUAGGA, .path = WATCHQUAGGA_VTYSH_PATH, .next = NULL},
 };
 
 enum vtysh_write_integrated vtysh_write_integrated = WRITE_INTEGRATED_UNSPECIFIED;
@@ -1073,7 +1074,7 @@ vtysh_end (void)
   return CMD_SUCCESS;
 }
 
-DEFUNSH (VTYSH_ALL,
+DEFUNSH (VTYSH_REALLYALL,
         vtysh_end_all,
         vtysh_end_all_cmd,
         "end",
@@ -1480,8 +1481,8 @@ DEFUNSH (VTYSH_ALL,
   return CMD_SUCCESS;
 }
 
-DEFUNSH (VTYSH_ALL,
-        vtysh_enable, 
+DEFUNSH (VTYSH_REALLYALL,
+        vtysh_enable,
         vtysh_enable_cmd,
         "enable",
         "Turn on privileged mode command\n")
@@ -1490,8 +1491,8 @@ DEFUNSH (VTYSH_ALL,
   return CMD_SUCCESS;
 }
 
-DEFUNSH (VTYSH_ALL,
-        vtysh_disable, 
+DEFUNSH (VTYSH_REALLYALL,
+        vtysh_disable,
         vtysh_disable_cmd,
         "disable",
         "Turn off privileged mode command\n")
@@ -1501,7 +1502,7 @@ DEFUNSH (VTYSH_ALL,
   return CMD_SUCCESS;
 }
 
-DEFUNSH (VTYSH_ALL,
+DEFUNSH (VTYSH_REALLYALL,
         vtysh_config_terminal,
         vtysh_config_terminal_cmd,
         "configure terminal",
@@ -1582,7 +1583,7 @@ vtysh_exit (struct vty *vty)
   return CMD_SUCCESS;
 }
 
-DEFUNSH (VTYSH_ALL,
+DEFUNSH (VTYSH_REALLYALL,
         vtysh_exit_all,
         vtysh_exit_all_cmd,
         "exit",
index d515918e0390b7efc69faabf5e5a762ef8551b27..dade049ad720c872b5fd34971fed3c9670716656 100644 (file)
@@ -34,7 +34,13 @@ DECLARE_MGROUP(MVTYSH)
 #define VTYSH_ISISD  0x40
 #define VTYSH_PIMD   0x100
 #define VTYSH_LDPD   0x200
+#define VTYSH_WATCHQUAGGA 0x400
 
+/* commands in REALLYALL are crucial to correct vtysh operation */
+#define VTYSH_REALLYALL          ~0U
+/* watchquagga is not in ALL since library CLI functions should not be
+ * run on it (logging & co. should stay in a fixed/frozen config, and
+ * things like prefix lists are not even initialised) */
 #define VTYSH_ALL        VTYSH_ZEBRA|VTYSH_RIPD|VTYSH_RIPNGD|VTYSH_OSPFD|VTYSH_OSPF6D|VTYSH_LDPD|VTYSH_BGPD|VTYSH_ISISD|VTYSH_PIMD
 #define VTYSH_RMAP       VTYSH_ZEBRA|VTYSH_RIPD|VTYSH_RIPNGD|VTYSH_OSPFD|VTYSH_OSPF6D|VTYSH_BGPD|VTYSH_PIMD
 #define VTYSH_INTERFACE          VTYSH_ZEBRA|VTYSH_RIPD|VTYSH_RIPNGD|VTYSH_OSPFD|VTYSH_OSPF6D|VTYSH_LDPD|VTYSH_ISISD|VTYSH_PIMD