From a43f6b1d4e1262285284426b70a46cd1bc88e46c Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Thu, 25 Apr 2019 16:39:49 +0300 Subject: [PATCH] bgpd: Make sure `next-hop-self all` backward compatible with force Signed-off-by: Donatas Abraitis --- bgpd/bgp_vty.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index a6adeea66d..b7b85a20b4 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -3816,6 +3816,13 @@ ALIAS_HIDDEN(neighbor_nexthop_self_force, "Disable the next hop calculation for this neighbor\n" "Set the next hop to self for reflected routes\n") +ALIAS_HIDDEN(neighbor_nexthop_self_force, + neighbor_nexthop_self_all_hidden_cmd, + "neighbor next-hop-self all", + NEIGHBOR_STR NEIGHBOR_ADDR_STR2 + "Disable the next hop calculation for this neighbor\n" + "Set the next hop to self for reflected routes\n") + DEFUN (no_neighbor_nexthop_self, no_neighbor_nexthop_self_cmd, "no neighbor next-hop-self", @@ -3857,6 +3864,13 @@ ALIAS_HIDDEN(no_neighbor_nexthop_self_force, "Disable the next hop calculation for this neighbor\n" "Set the next hop to self for reflected routes\n") +ALIAS_HIDDEN(no_neighbor_nexthop_self_force, + no_neighbor_nexthop_self_all_hidden_cmd, + "no neighbor next-hop-self all", + NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 + "Disable the next hop calculation for this neighbor\n" + "Set the next hop to self for reflected routes\n") + /* neighbor as-override */ DEFUN (neighbor_as_override, neighbor_as_override_cmd, @@ -12642,6 +12656,8 @@ void bgp_vty_init(void) /* "neighbor next-hop-self force" commands. */ install_element(BGP_NODE, &neighbor_nexthop_self_force_hidden_cmd); install_element(BGP_NODE, &no_neighbor_nexthop_self_force_hidden_cmd); + install_element(BGP_NODE, &neighbor_nexthop_self_all_hidden_cmd); + install_element(BGP_NODE, &no_neighbor_nexthop_self_all_hidden_cmd); install_element(BGP_IPV4_NODE, &neighbor_nexthop_self_force_cmd); install_element(BGP_IPV4_NODE, &no_neighbor_nexthop_self_force_cmd); install_element(BGP_IPV4M_NODE, &neighbor_nexthop_self_force_cmd); -- 2.39.5