diff options
author | David S. Miller <davem@davemloft.net> | 2010-05-03 00:43:40 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-05-03 01:02:06 -0400 |
commit | 7ef527377b88ff05fb122a47619ea506c631c914 (patch) | |
tree | 2c2e774527d5f591b975834f43e8c6fd12fb38f2 /net/ipv4/inet_connection_sock.c | |
parent | 47d29646a2c1c147d8a7598aeac2c87dd71ed638 (diff) | |
parent | 1183f3838c588545592c042c0ce15015661ce7f2 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'net/ipv4/inet_connection_sock.c')
-rw-r--r-- | net/ipv4/inet_connection_sock.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c index 78cbc39f56c4..e0a3e3537b14 100644 --- a/net/ipv4/inet_connection_sock.c +++ b/net/ipv4/inet_connection_sock.c | |||
@@ -70,17 +70,13 @@ int inet_csk_bind_conflict(const struct sock *sk, | |||
70 | (!sk->sk_bound_dev_if || | 70 | (!sk->sk_bound_dev_if || |
71 | !sk2->sk_bound_dev_if || | 71 | !sk2->sk_bound_dev_if || |
72 | sk->sk_bound_dev_if == sk2->sk_bound_dev_if)) { | 72 | sk->sk_bound_dev_if == sk2->sk_bound_dev_if)) { |
73 | const __be32 sk2_rcv_saddr = inet_rcv_saddr(sk2); | ||
74 | |||
75 | if (!reuse || !sk2->sk_reuse || | 73 | if (!reuse || !sk2->sk_reuse || |
76 | sk2->sk_state == TCP_LISTEN) { | 74 | sk2->sk_state == TCP_LISTEN) { |
75 | const __be32 sk2_rcv_saddr = inet_rcv_saddr(sk2); | ||
77 | if (!sk2_rcv_saddr || !sk_rcv_saddr || | 76 | if (!sk2_rcv_saddr || !sk_rcv_saddr || |
78 | sk2_rcv_saddr == sk_rcv_saddr) | 77 | sk2_rcv_saddr == sk_rcv_saddr) |
79 | break; | 78 | break; |
80 | } else if (reuse && sk2->sk_reuse && | 79 | } |
81 | sk2_rcv_saddr && | ||
82 | sk2_rcv_saddr == sk_rcv_saddr) | ||
83 | break; | ||
84 | } | 80 | } |
85 | } | 81 | } |
86 | return node != NULL; | 82 | return node != NULL; |
@@ -124,11 +120,9 @@ again: | |||
124 | smallest_size = tb->num_owners; | 120 | smallest_size = tb->num_owners; |
125 | smallest_rover = rover; | 121 | smallest_rover = rover; |
126 | if (atomic_read(&hashinfo->bsockets) > (high - low) + 1) { | 122 | if (atomic_read(&hashinfo->bsockets) > (high - low) + 1) { |
127 | if (!inet_csk(sk)->icsk_af_ops->bind_conflict(sk, tb)) { | 123 | spin_unlock(&head->lock); |
128 | spin_unlock(&head->lock); | 124 | snum = smallest_rover; |
129 | snum = smallest_rover; | 125 | goto have_snum; |
130 | goto have_snum; | ||
131 | } | ||
132 | } | 126 | } |
133 | } | 127 | } |
134 | goto next; | 128 | goto next; |