diff options
author | Quentin Young <qlyoung@users.noreply.github.com> | 2020-07-14 17:52:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-14 17:52:47 +0200 |
commit | 1f30402b929bd2716221d090702a8e26208df27e (patch) | |
tree | 945d8830742fdfcc3a83b3c8980c48671f44c9ba /vtysh/vtysh_config.c | |
parent | Merge pull request #6718 from opensourcerouting/bfd-profile-small-fix (diff) | |
parent | bgpd: change rtr_is_ integer to bool format (diff) | |
download | frr-1f30402b929bd2716221d090702a8e26208df27e.tar.xz frr-1f30402b929bd2716221d090702a8e26208df27e.zip |
Merge pull request #5015 from pguibert6WIND/rpki_vrf_encapsulation
Rpki Encapsulation
Diffstat (limited to 'vtysh/vtysh_config.c')
-rw-r--r-- | vtysh/vtysh_config.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/vtysh/vtysh_config.c b/vtysh/vtysh_config.c index 61bcf3b65..ab0c2b65c 100644 --- a/vtysh/vtysh_config.c +++ b/vtysh/vtysh_config.c @@ -265,13 +265,22 @@ 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 + else if (config->index == RPKI_VRF_NODE + && strncmp(line, " exit", + strlen(" exit")) == 0) { + config_add_line(config->line, line); + config->index = VRF_NODE; + } else config_add_line(config->line, line); } else config_add_line(config_top, line); @@ -403,6 +412,8 @@ 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")) |