Linked-list bug in new "use longest prefixes first" code.

This commit is contained in:
Simon Kelley
2013-01-02 17:59:28 +00:00
parent 34d0a36a1d
commit b456b9fdfe

View File

@@ -236,6 +236,8 @@ static int complete_context6(struct in6_addr *local, int prefix,
for (up = &param->current, tmp = param->current; tmp; tmp = tmp->current) for (up = &param->current, tmp = param->current; tmp; tmp = tmp->current)
if (tmp->preferred <= preferred) if (tmp->preferred <= preferred)
break; break;
else
up = &tmp->current;
context->current = *up; context->current = *up;
*up = context; *up = context;