提交 680a27a2 编写于 作者: T Thomas Graf 提交者: David S. Miller

[IPV6] address: Allow address changes while device is administrative down

Same behaviour as IPv4, using IFF_UP is a no-no anyway.
Signed-off-by: NThomas Graf <tgraf@suug.ch>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 0ab6803b
...@@ -1886,9 +1886,6 @@ static int inet6_addr_add(int ifindex, struct in6_addr *pfx, int plen, ...@@ -1886,9 +1886,6 @@ static int inet6_addr_add(int ifindex, struct in6_addr *pfx, int plen,
if ((dev = __dev_get_by_index(ifindex)) == NULL) if ((dev = __dev_get_by_index(ifindex)) == NULL)
return -ENODEV; return -ENODEV;
if (!(dev->flags&IFF_UP))
return -ENETDOWN;
if ((idev = addrconf_add_dev(dev)) == NULL) if ((idev = addrconf_add_dev(dev)) == NULL)
return -ENOBUFS; return -ENOBUFS;
...@@ -2922,9 +2919,6 @@ inet6_addr_modify(int ifindex, struct in6_addr *pfx, ...@@ -2922,9 +2919,6 @@ inet6_addr_modify(int ifindex, struct in6_addr *pfx,
if ((dev = __dev_get_by_index(ifindex)) == NULL) if ((dev = __dev_get_by_index(ifindex)) == NULL)
return -ENODEV; return -ENODEV;
if (!(dev->flags&IFF_UP))
return -ENETDOWN;
if (!valid_lft || (prefered_lft > valid_lft)) if (!valid_lft || (prefered_lft > valid_lft))
return -EINVAL; return -EINVAL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册