Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 351637
b: refs/heads/master
c: 9c5e0c0
h: refs/heads/master
i:
  351635: 88c0b51
v: v3
  • Loading branch information
Tom Herbert authored and David S. Miller committed Jan 27, 2013
1 parent 522dc5a commit ef3dcd5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 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: 5588d3742da9900323dc3d766845a53bacdfb5ab
refs/heads/master: 9c5e0c0bbc5f683ada546af3c39a5a90b156a6f0
11 changes: 4 additions & 7 deletions trunk/net/ipv4/inet_connection_sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@ int inet_csk_get_port(struct sock *sk, unsigned short snum)
ret = 1;
if (inet_csk(sk)->icsk_af_ops->bind_conflict(sk, tb, true)) {
if (((sk->sk_reuse && sk->sk_state != TCP_LISTEN) ||
(sk->sk_reuseport && uid_eq(tb->fastuid, uid))) &&
(tb->fastreuseport > 0 &&
sk->sk_reuseport && uid_eq(tb->fastuid, uid))) &&
smallest_size != -1 && --attempts >= 0) {
spin_unlock(&head->lock);
goto again;
Expand All @@ -227,19 +228,15 @@ int inet_csk_get_port(struct sock *sk, unsigned short snum)
if (sk->sk_reuseport) {
tb->fastreuseport = 1;
tb->fastuid = uid;
} else {
} else
tb->fastreuseport = 0;
tb->fastuid = 0;
}
} else {
if (tb->fastreuse &&
(!sk->sk_reuse || sk->sk_state == TCP_LISTEN))
tb->fastreuse = 0;
if (tb->fastreuseport &&
(!sk->sk_reuseport || !uid_eq(tb->fastuid, uid))) {
(!sk->sk_reuseport || !uid_eq(tb->fastuid, uid)))
tb->fastreuseport = 0;
tb->fastuid = 0;
}
}
success:
if (!inet_csk(sk)->icsk_bind_hash)
Expand Down

0 comments on commit ef3dcd5

Please sign in to comment.