diff options
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r-- | net/ipv6/route.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index d3588885f097..3821a3517478 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -2504,9 +2504,9 @@ static int ip6_route_multipath(struct fib6_config *cfg, int add) | |||
2504 | int attrlen; | 2504 | int attrlen; |
2505 | int err = 0, last_err = 0; | 2505 | int err = 0, last_err = 0; |
2506 | 2506 | ||
2507 | remaining = cfg->fc_mp_len; | ||
2507 | beginning: | 2508 | beginning: |
2508 | rtnh = (struct rtnexthop *)cfg->fc_mp; | 2509 | rtnh = (struct rtnexthop *)cfg->fc_mp; |
2509 | remaining = cfg->fc_mp_len; | ||
2510 | 2510 | ||
2511 | /* Parse a Multipath Entry */ | 2511 | /* Parse a Multipath Entry */ |
2512 | while (rtnh_ok(rtnh, remaining)) { | 2512 | while (rtnh_ok(rtnh, remaining)) { |
@@ -2536,6 +2536,7 @@ beginning: | |||
2536 | * next hops that have been already added. | 2536 | * next hops that have been already added. |
2537 | */ | 2537 | */ |
2538 | add = 0; | 2538 | add = 0; |
2539 | remaining = cfg->fc_mp_len - remaining; | ||
2539 | goto beginning; | 2540 | goto beginning; |
2540 | } | 2541 | } |
2541 | } | 2542 | } |