Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 201312
b: refs/heads/master
c: 64e724f
h: refs/heads/master
v: v3
  • Loading branch information
Brian Haley authored and David S. Miller committed Jul 22, 2010
1 parent 6886f20 commit 6c15df1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: be2b6e62357dd7ee56bdcb05e54002afb4830292
refs/heads/master: 64e724f62ab743d55229cd5e27ec8b068b68eb16
14 changes: 9 additions & 5 deletions trunk/net/ipv6/addrconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1760,7 +1760,10 @@ static struct inet6_dev *addrconf_add_dev(struct net_device *dev)

idev = ipv6_find_idev(dev);
if (!idev)
return NULL;
return ERR_PTR(-ENOBUFS);

if (idev->cnf.disable_ipv6)
return ERR_PTR(-EACCES);

/* Add default multicast route */
addrconf_add_mroute(dev);
Expand Down Expand Up @@ -2129,8 +2132,9 @@ static int inet6_addr_add(struct net *net, int ifindex, struct in6_addr *pfx,
if (!dev)
return -ENODEV;

if ((idev = addrconf_add_dev(dev)) == NULL)
return -ENOBUFS;
idev = addrconf_add_dev(dev);
if (IS_ERR(idev))
return PTR_ERR(idev);

scope = ipv6_addr_scope(pfx);

Expand Down Expand Up @@ -2377,7 +2381,7 @@ static void addrconf_dev_config(struct net_device *dev)
}

idev = addrconf_add_dev(dev);
if (idev == NULL)
if (IS_ERR(idev))
return;

memset(&addr, 0, sizeof(struct in6_addr));
Expand Down Expand Up @@ -2468,7 +2472,7 @@ static void addrconf_ip6_tnl_config(struct net_device *dev)
ASSERT_RTNL();

idev = addrconf_add_dev(dev);
if (!idev) {
if (IS_ERR(idev)) {
printk(KERN_DEBUG "init ip6-ip6: add_dev failed\n");
return;
}
Expand Down

0 comments on commit 6c15df1

Please sign in to comment.