From d643e5f30155e46aa6f345aa52d8ef5026d879a6 Mon Sep 17 00:00:00 2001 From: Dave Barach Date: Mon, 30 Mar 2020 11:06:46 -0400 Subject: misc: fix ip6_neighbor_cmd The option parsing loop had "break" statements included in each 'if (unformat (line_input, "this-option ...") option_values=xxx;' statement. Result: the code would silently ignore all but the first option. Probably broken forever, not easy to spot because the code looks OK even though it's badly broken. Manual cherrypick: the function name has changed, the code has moved to a different file, and the MAINTAINERS file entry doesn't exist in 19.08. Type: fix Signed-off-by: Dave Barach (cherry picked from commit 7249b90ab21c20138907e692dcb6032aea9e2f0f) Change-Id: Ie06bb083645302848a19ecc9ad2934927de01f62 --- src/vnet/ip/ip6_neighbor.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/vnet/ip/ip6_neighbor.c b/src/vnet/ip/ip6_neighbor.c index 071d3eb6673..87aa581b00e 100644 --- a/src/vnet/ip/ip6_neighbor.c +++ b/src/vnet/ip/ip6_neighbor.c @@ -3708,34 +3708,28 @@ ip6_neighbor_cmd (vlib_main_t * vm, unformat_input_t * main_input, unformat_ip6_address, &ip6_addr, &addr_len)) { add_radv_info = 0; - break; } else if (unformat (line_input, "ra-managed-config-flag")) { managed = 1; - break; } else if (unformat (line_input, "ra-other-config-flag")) { other = 1; - break; } else if (unformat (line_input, "ra-suppress") || unformat (line_input, "ra-surpress")) { suppress = 1; - break; } else if (unformat (line_input, "ra-suppress-link-layer") || unformat (line_input, "ra-surpress-link-layer")) { suppress_ll_option = 1; - break; } else if (unformat (line_input, "ra-send-unicast")) { send_unicast = 1; - break; } else if (unformat (line_input, "ra-lifetime")) { @@ -3745,7 +3739,6 @@ ip6_neighbor_cmd (vlib_main_t * vm, unformat_input_t * main_input, goto done; } use_lifetime = 1; - break; } else if (unformat (line_input, "ra-initial")) { @@ -3755,7 +3748,6 @@ ip6_neighbor_cmd (vlib_main_t * vm, unformat_input_t * main_input, error = unformat_parse_error (line_input); goto done; } - break; } else if (unformat (line_input, "ra-interval")) { @@ -3767,12 +3759,10 @@ ip6_neighbor_cmd (vlib_main_t * vm, unformat_input_t * main_input, if (!unformat (line_input, "%d", &ra_min_interval)) ra_min_interval = 0; - break; } else if (unformat (line_input, "ra-cease")) { cease = 1; - break; } else { -- cgit 1.2.3-korg