提交 5e1eeef6 编写于 作者: H Hangbin Liu 提交者: David S. Miller

bonding: NS target should accept link local address

When setting bond NS target, we use bond_is_ip6_target_ok() to check
if the address valid. The link local address was wrongly rejected in
bond_changelink(), as most time the user just set the ARP/NS target to
gateway, while the IPv6 gateway is always a link local address when user
set up interface via SLAAC.

So remove the link local addr check when setting bond NS target.

Fixes: 129e3c1b ("bonding: add new option ns_ip6_target")
Reported-by: NLi Liang <liali@redhat.com>
Signed-off-by: NHangbin Liu <liuhangbin@gmail.com>
Reviewed-by: NJonathan Toppins <jtoppins@redhat.com>
Acked-by: NJay Vosburgh <jay.vosburgh@canonical.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 91179917
......@@ -290,11 +290,6 @@ static int bond_changelink(struct net_device *bond_dev, struct nlattr *tb[],
addr6 = nla_get_in6_addr(attr);
if (ipv6_addr_type(&addr6) & IPV6_ADDR_LINKLOCAL) {
NL_SET_ERR_MSG(extack, "Invalid IPv6 addr6");
return -EINVAL;
}
bond_opt_initextra(&newval, &addr6, sizeof(addr6));
err = __bond_opt_set(bond, BOND_OPT_NS_TARGETS,
&newval);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册