diff options
author | David S. Miller <davem@davemloft.net> | 2010-04-27 15:49:13 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-04-27 15:49:13 -0400 |
commit | e1703b36c358dde24ececba4fd609ecd91433ba3 (patch) | |
tree | d59c333d0ad5bf72f165264eba6048c87fdc4e0f /net/ipv4 | |
parent | 7ec75c582e639d956ce3afd499f67febe6f902a4 (diff) | |
parent | e95ef5d3f6bc60433883e1ef65dac747acd0bf1a (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/e100.c
drivers/net/e1000e/netdev.c
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/inet_connection_sock.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c index e0a3e3537b1..78cbc39f56c 100644 --- a/net/ipv4/inet_connection_sock.c +++ b/net/ipv4/inet_connection_sock.c | |||
@@ -70,13 +70,17 @@ 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 | |||
73 | if (!reuse || !sk2->sk_reuse || | 75 | if (!reuse || !sk2->sk_reuse || |
74 | sk2->sk_state == TCP_LISTEN) { | 76 | sk2->sk_state == TCP_LISTEN) { |
75 | const __be32 sk2_rcv_saddr = inet_rcv_saddr(sk2); | ||
76 | if (!sk2_rcv_saddr || !sk_rcv_saddr || | 77 | if (!sk2_rcv_saddr || !sk_rcv_saddr || |
77 | sk2_rcv_saddr == sk_rcv_saddr) | 78 | sk2_rcv_saddr == sk_rcv_saddr) |
78 | break; | 79 | break; |
79 | } | 80 | } else if (reuse && sk2->sk_reuse && |
81 | sk2_rcv_saddr && | ||
82 | sk2_rcv_saddr == sk_rcv_saddr) | ||
83 | break; | ||
80 | } | 84 | } |
81 | } | 85 | } |
82 | return node != NULL; | 86 | return node != NULL; |
@@ -120,9 +124,11 @@ again: | |||
120 | smallest_size = tb->num_owners; | 124 | smallest_size = tb->num_owners; |
121 | smallest_rover = rover; | 125 | smallest_rover = rover; |
122 | if (atomic_read(&hashinfo->bsockets) > (high - low) + 1) { | 126 | if (atomic_read(&hashinfo->bsockets) > (high - low) + 1) { |
123 | spin_unlock(&head->lock); | 127 | if (!inet_csk(sk)->icsk_af_ops->bind_conflict(sk, tb)) { |
124 | snum = smallest_rover; | 128 | spin_unlock(&head->lock); |
125 | goto have_snum; | 129 | snum = smallest_rover; |
130 | goto have_snum; | ||
131 | } | ||
126 | } | 132 | } |
127 | } | 133 | } |
128 | goto next; | 134 | goto next; |