summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2020-02-26 08:02:58 -0500
committerFlorin Coras <florin.coras@gmail.com>2020-02-26 20:05:57 +0000
commit7249b90ab21c20138907e692dcb6032aea9e2f0f (patch)
treeedc02cf0532e55cf93117ef92da5aaba5271e02e
parent5fa4525543b212dd04b4f687722bf7feb1eeb6f9 (diff)
ip-neighbor: fix ip6_ra_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. Type: fix Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I667bee85b4ca654b53fb3af421f957957ed0f0f8
-rw-r--r--src/vnet/ip6-nd/ip6_ra.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/vnet/ip6-nd/ip6_ra.c b/src/vnet/ip6-nd/ip6_ra.c
index c8e16d0c0ee..769f9dabe5c 100644
--- a/src/vnet/ip6-nd/ip6_ra.c
+++ b/src/vnet/ip6-nd/ip6_ra.c
@@ -1947,34 +1947,28 @@ ip6_ra_cmd (vlib_main_t * vm,
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"))
{
@@ -1984,7 +1978,6 @@ ip6_ra_cmd (vlib_main_t * vm,
goto done;
}
use_lifetime = 1;
- break;
}
else if (unformat (line_input, "ra-initial"))
{
@@ -1994,7 +1987,6 @@ ip6_ra_cmd (vlib_main_t * vm,
error = unformat_parse_error (line_input);
goto done;
}
- break;
}
else if (unformat (line_input, "ra-interval"))
{
@@ -2006,12 +1998,10 @@ ip6_ra_cmd (vlib_main_t * vm,
if (!unformat (line_input, "%d", &ra_min_interval))
ra_min_interval = 0;
- break;
}
else if (unformat (line_input, "ra-cease"))
{
cease = 1;
- break;
}
else
{