summaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2020-03-30 11:06:46 -0400
committerAndrew Yourtchenko <ayourtch@gmail.com>2020-04-01 11:41:56 +0000
commitd643e5f30155e46aa6f345aa52d8ef5026d879a6 (patch)
treec44177c1696b80a5a7c7cd643d212787237d98db /src/vnet
parent88e47b0e476d40636f165dd55fc0c5f0542f81b9 (diff)
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 <dave@barachs.net> (cherry picked from commit 7249b90ab21c20138907e692dcb6032aea9e2f0f) Change-Id: Ie06bb083645302848a19ecc9ad2934927de01f62
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/ip/ip6_neighbor.c10
1 files changed, 0 insertions, 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
{