diff --git a/net/ipv6/route.c b/net/ipv6/route.c index c7115fdf932ce6eb15abe81df5f1a901b7af65b1..960b0c987788e7f153915ab73785ece746799ce9 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -4229,6 +4229,10 @@ static int rtm_to_fib6_config(struct sk_buff *skb, struct nlmsghdr *nlh, cfg->fc_gateway = nla_get_in6_addr(tb[RTA_GATEWAY]); cfg->fc_flags |= RTF_GATEWAY; } + if (tb[RTA_VIA]) { + NL_SET_ERR_MSG(extack, "IPv6 does not support RTA_VIA attribute"); + goto errout; + } if (tb[RTA_DST]) { int plen = (rtm->rtm_dst_len + 7) >> 3;