From: vivek Date: Wed, 21 Oct 2015 05:21:39 +0000 (-0700) Subject: Fix location of some of the commands in integrated config X-Git-Tag: frr-2.0-rc1~1225 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=80b55c57a1fb1f19b0779765b1ddf173347d03d6;p=matthieu%2Ffrr.git 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 --- 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