diff options
Diffstat (limited to 'vtysh')
| -rw-r--r-- | vtysh/vtysh.c | 29 | ||||
| -rw-r--r-- | vtysh/vtysh.h | 2 | ||||
| -rw-r--r-- | vtysh/vtysh_config.c | 13 |
3 files changed, 3 insertions, 41 deletions
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index 4bf62d130e..9e5885c7b6 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -1481,13 +1481,6 @@ static struct cmd_node rpki_node = { .prompt = "%s(config-rpki)# ", }; -static struct cmd_node rpki_vrf_node = { - .name = "rpki", - .node = RPKI_VRF_NODE, - .parent_node = VRF_NODE, - .prompt = "%s(config-vrf-rpki)# ", -}; - #if HAVE_BFDD > 0 static struct cmd_node bfd_node = { .name = "bfd", @@ -1670,25 +1663,12 @@ DEFUNSH(VTYSH_BGPD, address_family_ipv6_labeled_unicast, } DEFUNSH(VTYSH_BGPD, - no_rpki, - no_rpki_cmd, - "no rpki", - NO_STR - "rpki\n") -{ - return CMD_SUCCESS; -} - -DEFUNSH(VTYSH_BGPD, rpki, rpki_cmd, "rpki", "Enable rpki and enter rpki configuration mode\n") { - if (vty->node == CONFIG_NODE) - vty->node = RPKI_NODE; - else - vty->node = RPKI_VRF_NODE; + vty->node = RPKI_NODE; return CMD_SUCCESS; } @@ -3838,7 +3818,6 @@ void vtysh_init_vty(void) install_node(&vty_node); install_node(&rpki_node); install_node(&bmp_node); - install_node(&rpki_vrf_node); #if HAVE_BFDD > 0 install_node(&bfd_node); install_node(&bfd_peer_node); @@ -4083,15 +4062,9 @@ void vtysh_init_vty(void) install_element(BMP_NODE, &vtysh_end_all_cmd); install_element(CONFIG_NODE, &rpki_cmd); - install_element(CONFIG_NODE, &no_rpki_cmd); - install_element(VRF_NODE, &rpki_cmd); - install_element(VRF_NODE, &no_rpki_cmd); install_element(RPKI_NODE, &rpki_exit_cmd); install_element(RPKI_NODE, &rpki_quit_cmd); install_element(RPKI_NODE, &vtysh_end_all_cmd); - install_element(RPKI_VRF_NODE, &rpki_exit_cmd); - install_element(RPKI_VRF_NODE, &rpki_quit_cmd); - install_element(RPKI_VRF_NODE, &vtysh_end_all_cmd); /* EVPN commands */ install_element(BGP_EVPN_NODE, &bgp_evpn_vni_cmd); diff --git a/vtysh/vtysh.h b/vtysh/vtysh.h index 97ae8b4890..d0edbb2710 100644 --- a/vtysh/vtysh.h +++ b/vtysh/vtysh.h @@ -54,7 +54,7 @@ DECLARE_MGROUP(MVTYSH) #define VTYSH_ALL VTYSH_ZEBRA|VTYSH_RIPD|VTYSH_RIPNGD|VTYSH_OSPFD|VTYSH_OSPF6D|VTYSH_LDPD|VTYSH_BGPD|VTYSH_ISISD|VTYSH_PIMD|VTYSH_NHRPD|VTYSH_EIGRPD|VTYSH_BABELD|VTYSH_SHARPD|VTYSH_PBRD|VTYSH_STATICD|VTYSH_BFDD|VTYSH_FABRICD|VTYSH_VRRPD #define VTYSH_RMAP VTYSH_ZEBRA|VTYSH_RIPD|VTYSH_RIPNGD|VTYSH_OSPFD|VTYSH_OSPF6D|VTYSH_BGPD|VTYSH_ISISD|VTYSH_PIMD|VTYSH_EIGRPD|VTYSH_SHARPD|VTYSH_FABRICD #define VTYSH_INTERFACE VTYSH_ZEBRA|VTYSH_RIPD|VTYSH_RIPNGD|VTYSH_OSPFD|VTYSH_OSPF6D|VTYSH_ISISD|VTYSH_PIMD|VTYSH_NHRPD|VTYSH_EIGRPD|VTYSH_BABELD|VTYSH_PBRD|VTYSH_FABRICD|VTYSH_VRRPD -#define VTYSH_VRF VTYSH_ZEBRA|VTYSH_PIMD|VTYSH_STATICD|VTYSH_BGPD +#define VTYSH_VRF VTYSH_ZEBRA|VTYSH_PIMD|VTYSH_STATICD #define VTYSH_KEYS VTYSH_RIPD|VTYSH_EIGRPD /* Daemons who can process nexthop-group configs */ #define VTYSH_NH_GROUP VTYSH_PBRD|VTYSH_SHARPD diff --git a/vtysh/vtysh_config.c b/vtysh/vtysh_config.c index ab0c2b65c3..61bcf3b658 100644 --- a/vtysh/vtysh_config.c +++ b/vtysh/vtysh_config.c @@ -265,22 +265,13 @@ void vtysh_config_parse_line(void *arg, const char *line) config_add_line(config->line, line); } else if (!strncmp(line, " ip mroute", strlen(" ip mroute"))) { config_add_line_uniq_end(config->line, line); - } else if ((strncmp(line, " rpki", strlen(" rpki")) == 0) - && config->index == VRF_NODE) { - config_add_line(config->line, line); - config->index = RPKI_VRF_NODE; } else if (config->index == RMAP_NODE || config->index == INTERFACE_NODE || config->index == VTY_NODE || config->index == VRF_NODE || config->index == NH_GROUP_NODE) config_add_line_uniq(config->line, line); - else if (config->index == RPKI_VRF_NODE - && strncmp(line, " exit", - strlen(" exit")) == 0) { - config_add_line(config->line, line); - config->index = VRF_NODE; - } else + else config_add_line(config->line, line); } else config_add_line(config_top, line); @@ -412,8 +403,6 @@ void vtysh_config_parse_line(void *arg, const char *line) config = config_get(MPLS_NODE, line); else if (strncmp(line, "bfd", strlen("bfd")) == 0) config = config_get(BFD_NODE, line); - else if (strncmp(line, "rpki", strlen("rpki")) == 0) - config = config_get(RPKI_NODE, line); else { if (strncmp(line, "log", strlen("log")) == 0 || strncmp(line, "hostname", strlen("hostname")) |
