diff options
author | David S. Miller <davem@davemloft.net> | 2009-10-27 04:03:26 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-27 04:03:26 -0400 |
commit | cfadf853f6cd9689f79a63ca960c6f9d6665314f (patch) | |
tree | 35418e342d9783f0974ea33ef03875aa21d2362a /net/ipv6 | |
parent | 05423b241311c9380b7280179295bac7794281b6 (diff) | |
parent | f568a926a353d6816b3704d7367f34371df44ce7 (diff) |
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')
-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: | |||
497 | goto e_inval; | 497 | goto e_inval; |
498 | 498 | ||
499 | if (val) { | 499 | if (val) { |
500 | struct net_device *dev; | ||
501 | |||
500 | if (sk->sk_bound_dev_if && sk->sk_bound_dev_if != val) | 502 | if (sk->sk_bound_dev_if && sk->sk_bound_dev_if != val) |
501 | goto e_inval; | 503 | goto e_inval; |
502 | 504 | ||
503 | if (__dev_get_by_index(net, val) == NULL) { | 505 | dev = dev_get_by_index(net, val); |
506 | if (!dev) { | ||
504 | retv = -ENODEV; | 507 | retv = -ENODEV; |
505 | break; | 508 | break; |
506 | } | 509 | } |
510 | dev_put(dev); | ||
507 | } | 511 | } |
508 | np->mcast_oif = val; | 512 | np->mcast_oif = val; |
509 | retv = 0; | 513 | retv = 0; |