X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=net%2Fipv4%2Finet_connection_sock.c;h=828ea211ff211b204185b52b20d1a719912d5699;hb=135cedad7457be6a96d5e151dfd48f7888a75e94;hp=ee55678a987d543da5116be996853dccd48534fb;hpb=3d58b5fa8e4c461ab09afdacd3d1754fccca06ad;p=linux-2.6 diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c index ee55678a98..828ea211ff 100644 --- a/net/ipv4/inet_connection_sock.c +++ b/net/ipv4/inet_connection_sock.c @@ -55,6 +55,13 @@ int inet_csk_bind_conflict(const struct sock *sk, struct hlist_node *node; int reuse = sk->sk_reuse; + /* + * Unlike other sk lookup places we do not check + * for sk_net here, since _all_ the socks listed + * in tb->owners list belong to the same net - the + * one this bucket belongs to. + */ + sk_for_each_bound(sk2, node, &tb->owners) { if (sk != sk2 && !inet_v6_ipv6only(sk2) && @@ -133,8 +140,6 @@ int inet_csk_get_port(struct sock *sk, unsigned short snum) goto tb_not_found; tb_found: if (!hlist_empty(&tb->owners)) { - if (sk->sk_reuse > 1) - goto success; if (tb->fastreuse > 0 && sk->sk_reuse && sk->sk_state != TCP_LISTEN) { goto success;