diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 9df115e89f6c..1bc81be07ccd 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -4606,7 +4606,11 @@ static int ip6_route_multipath_del(struct fib6_config *cfg, nla = nla_find(attrs, attrlen, RTA_GATEWAY); if (nla) { - nla_memcpy(&r_cfg.fc_gateway, nla, 16); + err = fib6_gw_from_attr(&r_cfg.fc_gateway, nla, + extack); + if (err) + return err; + r_cfg.fc_flags |= RTF_GATEWAY; } }