From 80b55c57a1fb1f19b0779765b1ddf173347d03d6 Mon Sep 17 00:00:00 2001 From: vivek Date: Tue, 20 Oct 2015 22:21:39 -0700 Subject: [PATCH] Fix location of some of the commands in integrated config Ticket: Reviewed By: CCR-3509 Testing Done: bgpsmoke, enhe, tests with/without this change When saving an integrated config file, certain commands such as "ipv6 protocol", "ip nht route-map" etc. ended up with a very different group of commands making it hard to look for them. This fixes the command grouping so that related commands are located together. Signed-off-by: Dinesh G Dutt Reviewed-by: Donald Sharp Reviewed-by: Vipin Kumar --- vtysh/vtysh_config.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/vtysh/vtysh_config.c b/vtysh/vtysh_config.c index fc0fa351a9..a0f973588b 100644 --- a/vtysh/vtysh_config.c +++ b/vtysh/vtysh_config.c @@ -225,8 +225,6 @@ vtysh_config_parse_line (const char *line) config = config_get (BGP_NODE, line); else if (strncmp (line, "router isis", strlen ("router isis")) == 0) config = config_get (ISIS_NODE, line); - else if (strncmp (line, "router bgp", strlen ("router bgp")) == 0) - config = config_get (BGP_NODE, line); else if (strncmp (line, "route-map", strlen ("route-map")) == 0) config = config_get (RMAP_NODE, line); else if (strncmp (line, "access-list", strlen ("access-list")) == 0) @@ -269,6 +267,12 @@ vtysh_config_parse_line (const char *line) config = config_get (AAA_NODE, line); else if (strncmp (line, "ip protocol", strlen ("ip protocol")) == 0) config = config_get (PROTOCOL_NODE, line); + else if (strncmp (line, "ipv6 protocol", strlen ("ipv6 protocol")) == 0) + config = config_get (PROTOCOL_NODE, line); + else if (strncmp (line, "ip nht", strlen ("ip nht")) == 0) + config = config_get (PROTOCOL_NODE, line); + else if (strncmp (line, "ipv6 nht", strlen ("ipv6 nht")) == 0) + config = config_get (PROTOCOL_NODE, line); else { if (strncmp (line, "log", strlen ("log")) == 0 -- 2.39.5