diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 7d10a4488b85dca1bffdc9823409fcbe6581d490..230d4af44a30090c47201c24071dad586ff1b370 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -5348,8 +5348,10 @@ static int ip6_route_multipath_del(struct fib6_config *cfg, if (nla) { err = fib6_gw_from_attr(&r_cfg.fc_gateway, nla, extack); - if (err) - return err; + if (err) { + last_err = err; + goto next_rtnh; + } r_cfg.fc_flags |= RTF_GATEWAY; } @@ -5358,6 +5360,7 @@ static int ip6_route_multipath_del(struct fib6_config *cfg, if (err) last_err = err; +next_rtnh: rtnh = rtnh_next(rtnh, &remaining); }