From ef3dcd5913252e125bda1f81295b132f66952df8 Mon Sep 17 00:00:00 2001 From: Tom Herbert Date: Sat, 26 Jan 2013 07:50:54 +0000 Subject: [PATCH] --- yaml --- r: 351637 b: refs/heads/master c: 9c5e0c0bbc5f683ada546af3c39a5a90b156a6f0 h: refs/heads/master i: 351635: 88c0b5106c98698cc4ef54eee72d2f81fb550b42 v: v3 --- [refs] | 2 +- trunk/net/ipv4/inet_connection_sock.c | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index 46ad7817e9fa..afabd554ff58 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5588d3742da9900323dc3d766845a53bacdfb5ab +refs/heads/master: 9c5e0c0bbc5f683ada546af3c39a5a90b156a6f0 diff --git a/trunk/net/ipv4/inet_connection_sock.c b/trunk/net/ipv4/inet_connection_sock.c index 8bb623d357ad..11cb4979a465 100644 --- a/trunk/net/ipv4/inet_connection_sock.c +++ b/trunk/net/ipv4/inet_connection_sock.c @@ -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; @@ -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)