diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2008-04-14 05:42:27 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-14 05:42:27 -0400 |
commit | 7477fd2e6b676fcd15861c2a96a7172f71afe0a5 (patch) | |
tree | 82801f361c0e196a8b67481a5fd9435a206ba76f /net/ipv4/inet_connection_sock.c | |
parent | 13f51d82acb003918d71ce4639ae77fceaa58cad (diff) |
[SOCK]: Add some notes about per-bind-bucket sock lookup.
I was asked about "why don't we perform a sk_net filtering in
bind_conflict calls, like we do in other sock lookup places"
for a couple of times.
Can we please add a comment about why we do not need one?
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/inet_connection_sock.c')
-rw-r--r-- | net/ipv4/inet_connection_sock.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c index 8d70cfbacb7..828ea211ff2 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, | |||
55 | struct hlist_node *node; | 55 | struct hlist_node *node; |
56 | int reuse = sk->sk_reuse; | 56 | int reuse = sk->sk_reuse; |
57 | 57 | ||
58 | /* | ||
59 | * Unlike other sk lookup places we do not check | ||
60 | * for sk_net here, since _all_ the socks listed | ||
61 | * in tb->owners list belong to the same net - the | ||
62 | * one this bucket belongs to. | ||
63 | */ | ||
64 | |||
58 | sk_for_each_bound(sk2, node, &tb->owners) { | 65 | sk_for_each_bound(sk2, node, &tb->owners) { |
59 | if (sk != sk2 && | 66 | if (sk != sk2 && |
60 | !inet_v6_ipv6only(sk2) && | 67 | !inet_v6_ipv6only(sk2) && |