Skip to content

Commit e30a845

Browse files
dsahernkuba-moo
authored andcommitted
ipv6: Continue processing multipath route even if gateway attribute is invalid
ip6_route_multipath_del loop continues processing the multipath attribute even if delete of a nexthop path fails. For consistency, do the same if the gateway attribute is invalid. Fixes: 1ff15a7 ("ipv6: Check attribute length for RTA_GATEWAY when deleting multipath route") Signed-off-by: David Ahern <[email protected]> Acked-by: Nicolas Dichtel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 1ef5e1d commit e30a845

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

net/ipv6/route.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5459,8 +5459,10 @@ static int ip6_route_multipath_del(struct fib6_config *cfg,
54595459
if (nla) {
54605460
err = fib6_gw_from_attr(&r_cfg.fc_gateway, nla,
54615461
extack);
5462-
if (err)
5463-
return err;
5462+
if (err) {
5463+
last_err = err;
5464+
goto next_rtnh;
5465+
}
54645466

54655467
r_cfg.fc_flags |= RTF_GATEWAY;
54665468
}
@@ -5469,6 +5471,7 @@ static int ip6_route_multipath_del(struct fib6_config *cfg,
54695471
if (err)
54705472
last_err = err;
54715473

5474+
next_rtnh:
54725475
rtnh = rtnh_next(rtnh, &remaining);
54735476
}
54745477

0 commit comments

Comments
 (0)