diff options
author | David S. Miller <davem@davemloft.net> | 2009-10-27 09:03:26 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-27 09:03:26 +0100 |
commit | cfadf853f6cd9689f79a63ca960c6f9d6665314f (patch) | |
tree | 35418e342d9783f0974ea33ef03875aa21d2362a /net/ipv6/ipv6_sockglue.c | |
parent | vlan: allow null VLAN ID to be used (diff) | |
parent | sh_eth: Add asm/cacheflush.h (diff) | |
download | linux-cfadf853f6cd9689f79a63ca960c6f9d6665314f.tar.xz linux-cfadf853f6cd9689f79a63ca960c6f9d6665314f.zip |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/sh_eth.c
Diffstat (limited to 'net/ipv6/ipv6_sockglue.c')
-rw-r--r-- | net/ipv6/ipv6_sockglue.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c index 68566de4bcc5..430454ee5ead 100644 --- a/net/ipv6/ipv6_sockglue.c +++ b/net/ipv6/ipv6_sockglue.c @@ -497,13 +497,17 @@ done: goto e_inval; if (val) { + struct net_device *dev; + if (sk->sk_bound_dev_if && sk->sk_bound_dev_if != val) goto e_inval; - if (__dev_get_by_index(net, val) == NULL) { + dev = dev_get_by_index(net, val); + if (!dev) { retv = -ENODEV; break; } + dev_put(dev); } np->mcast_oif = val; retv = 0; |