Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 73601
b: refs/heads/master
c: be85d4a
h: refs/heads/master
i:
  73599: 43f5df7
v: v3
  • Loading branch information
Urs Thuermann authored and David S. Miller committed Nov 13, 2007
1 parent 3a3ad06 commit 9b0fb49
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 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: 57ce45dd16cd427ac2bdef202daf513bd25d650b
refs/heads/master: be85d4ad8ab69520e5ca4717c491a311c9eeae59
16 changes: 5 additions & 11 deletions trunk/net/packet/af_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -881,20 +881,14 @@ static int packet_do_bind(struct sock *sk, struct net_device *dev, __be16 protoc
if (protocol == 0)
goto out_unlock;

if (dev) {
if (dev->flags&IFF_UP) {
dev_add_pack(&po->prot_hook);
sock_hold(sk);
po->running = 1;
} else {
sk->sk_err = ENETDOWN;
if (!sock_flag(sk, SOCK_DEAD))
sk->sk_error_report(sk);
}
} else {
if (!dev || (dev->flags & IFF_UP)) {
dev_add_pack(&po->prot_hook);
sock_hold(sk);
po->running = 1;
} else {
sk->sk_err = ENETDOWN;
if (!sock_flag(sk, SOCK_DEAD))
sk->sk_error_report(sk);
}

out_unlock:
Expand Down

0 comments on commit 9b0fb49

Please sign in to comment.