diff options
author | David S. Miller <davem@davemloft.net> | 2010-07-28 00:01:35 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-07-28 00:01:35 -0400 |
commit | bb7e95c8fd859922c6cf3ebbb3a8546007df1748 (patch) | |
tree | 58b54c6306ba168b76f25cc6dc9a2d1d2eb830a7 /net/ipv6 | |
parent | b8bc0421ab7f83712a0a8ef7eb05fa73ec53c027 (diff) | |
parent | 5447080cfa3c77154498dfbf225367ac85b4c2b5 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/bnx2x_main.c
Merge bnx2x bug fixes in by hand... :-/
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/addrconf.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index e81155d2f251..ab70a3fbcafa 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -1763,7 +1763,10 @@ static struct inet6_dev *addrconf_add_dev(struct net_device *dev) | |||
1763 | 1763 | ||
1764 | idev = ipv6_find_idev(dev); | 1764 | idev = ipv6_find_idev(dev); |
1765 | if (!idev) | 1765 | if (!idev) |
1766 | return NULL; | 1766 | return ERR_PTR(-ENOBUFS); |
1767 | |||
1768 | if (idev->cnf.disable_ipv6) | ||
1769 | return ERR_PTR(-EACCES); | ||
1767 | 1770 | ||
1768 | /* Add default multicast route */ | 1771 | /* Add default multicast route */ |
1769 | addrconf_add_mroute(dev); | 1772 | addrconf_add_mroute(dev); |
@@ -2132,8 +2135,9 @@ static int inet6_addr_add(struct net *net, int ifindex, struct in6_addr *pfx, | |||
2132 | if (!dev) | 2135 | if (!dev) |
2133 | return -ENODEV; | 2136 | return -ENODEV; |
2134 | 2137 | ||
2135 | if ((idev = addrconf_add_dev(dev)) == NULL) | 2138 | idev = addrconf_add_dev(dev); |
2136 | return -ENOBUFS; | 2139 | if (IS_ERR(idev)) |
2140 | return PTR_ERR(idev); | ||
2137 | 2141 | ||
2138 | scope = ipv6_addr_scope(pfx); | 2142 | scope = ipv6_addr_scope(pfx); |
2139 | 2143 | ||
@@ -2380,7 +2384,7 @@ static void addrconf_dev_config(struct net_device *dev) | |||
2380 | } | 2384 | } |
2381 | 2385 | ||
2382 | idev = addrconf_add_dev(dev); | 2386 | idev = addrconf_add_dev(dev); |
2383 | if (idev == NULL) | 2387 | if (IS_ERR(idev)) |
2384 | return; | 2388 | return; |
2385 | 2389 | ||
2386 | memset(&addr, 0, sizeof(struct in6_addr)); | 2390 | memset(&addr, 0, sizeof(struct in6_addr)); |
@@ -2471,7 +2475,7 @@ static void addrconf_ip6_tnl_config(struct net_device *dev) | |||
2471 | ASSERT_RTNL(); | 2475 | ASSERT_RTNL(); |
2472 | 2476 | ||
2473 | idev = addrconf_add_dev(dev); | 2477 | idev = addrconf_add_dev(dev); |
2474 | if (!idev) { | 2478 | if (IS_ERR(idev)) { |
2475 | printk(KERN_DEBUG "init ip6-ip6: add_dev failed\n"); | 2479 | printk(KERN_DEBUG "init ip6-ip6: add_dev failed\n"); |
2476 | return; | 2480 | return; |
2477 | } | 2481 | } |