diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2016-11-08 19:41:48 +0100 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2016-11-09 14:29:45 +0100 |
commit | 4a96e94474ec52767a18df7e84873d752d863834 (patch) | |
tree | 7e816e125305f0f6a99824c9dc98d501cf84195d /vtysh | |
parent | watchquagga: add "write integrated" (diff) | |
download | frr-4a96e94474ec52767a18df7e84873d752d863834.tar.xz frr-4a96e94474ec52767a18df7e84873d752d863834.zip |
vtysh: add watchquagga to target list
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>
Diffstat (limited to 'vtysh')
-rw-r--r-- | vtysh/vtysh.c | 15 | ||||
-rw-r--r-- | vtysh/vtysh.h | 6 |
2 files changed, 14 insertions, 7 deletions
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index ed6c892ba..9888c3534 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -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", diff --git a/vtysh/vtysh.h b/vtysh/vtysh.h index d515918e0..dade049ad 100644 --- a/vtysh/vtysh.h +++ b/vtysh/vtysh.h @@ -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 |