summaryrefslogtreecommitdiffstats
path: root/vtysh/vtysh_config.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@users.noreply.github.com>2020-07-14 17:52:47 +0200
committerGitHub <noreply@github.com>2020-07-14 17:52:47 +0200
commit1f30402b929bd2716221d090702a8e26208df27e (patch)
tree945d8830742fdfcc3a83b3c8980c48671f44c9ba /vtysh/vtysh_config.c
parentMerge pull request #6718 from opensourcerouting/bfd-profile-small-fix (diff)
parentbgpd: change rtr_is_ integer to bool format (diff)
downloadfrr-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.c13
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"))