zebra: fix link-params CLI handling
vtysh was breaking in a rather ugly way, and some "no" forms were
missing too.
diff --git a/vtysh/vtysh_config.c b/vtysh/vtysh_config.c
index c80c42a..e6d8823 100644
--- a/vtysh/vtysh_config.c
+++ b/vtysh/vtysh_config.c
@@ -184,8 +184,20 @@
else if (strncmp (line, " address-family ipv6",
strlen (" address-family ipv6")) == 0)
config = config_get (BGP_IPV6_NODE, line);
+ else if (strncmp (line, " link-params", strlen (" link-params")) == 0)
+ {
+ config_add_line (config->line, line);
+ config->index = LINK_PARAMS_NODE;
+ }
+ else if (config->index == LINK_PARAMS_NODE &&
+ strncmp (line, " exit", strlen (" exit")) == 0)
+ {
+ config_add_line (config->line, line);
+ config->index = INTERFACE_NODE;
+ }
else if (config->index == RMAP_NODE ||
- config->index == VTY_NODE)
+ config->index == INTERFACE_NODE ||
+ config->index == VTY_NODE)
config_add_line_uniq (config->line, line);
else
config_add_line (config->line, line);