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
unformat_ip6_address, &ip6_addr, &addr_len))
{
add_radv_info = 0;
unformat_ip6_address, &ip6_addr, &addr_len))
{
add_radv_info = 0;
}
else if (unformat (line_input, "ra-managed-config-flag"))
{
managed = 1;
}
else if (unformat (line_input, "ra-managed-config-flag"))
{
managed = 1;
}
else if (unformat (line_input, "ra-other-config-flag"))
{
other = 1;
}
else if (unformat (line_input, "ra-other-config-flag"))
{
other = 1;
}
else if (unformat (line_input, "ra-suppress") ||
unformat (line_input, "ra-surpress"))
{
suppress = 1;
}
else if (unformat (line_input, "ra-suppress") ||
unformat (line_input, "ra-surpress"))
{
suppress = 1;
}
else if (unformat (line_input, "ra-suppress-link-layer") ||
unformat (line_input, "ra-surpress-link-layer"))
{
suppress_ll_option = 1;
}
else if (unformat (line_input, "ra-suppress-link-layer") ||
unformat (line_input, "ra-surpress-link-layer"))
{
suppress_ll_option = 1;
}
else if (unformat (line_input, "ra-send-unicast"))
{
send_unicast = 1;
}
else if (unformat (line_input, "ra-send-unicast"))
{
send_unicast = 1;
}
else if (unformat (line_input, "ra-lifetime"))
{
}
else if (unformat (line_input, "ra-lifetime"))
{
goto done;
}
use_lifetime = 1;
goto done;
}
use_lifetime = 1;
}
else if (unformat (line_input, "ra-initial"))
{
}
else if (unformat (line_input, "ra-initial"))
{
error = unformat_parse_error (line_input);
goto done;
}
error = unformat_parse_error (line_input);
goto done;
}
}
else if (unformat (line_input, "ra-interval"))
{
}
else if (unformat (line_input, "ra-interval"))
{
if (!unformat (line_input, "%d", &ra_min_interval))
ra_min_interval = 0;
if (!unformat (line_input, "%d", &ra_min_interval))
ra_min_interval = 0;
}
else if (unformat (line_input, "ra-cease"))
{
cease = 1;
}
else if (unformat (line_input, "ra-cease"))
{
cease = 1;