aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@parallels.com>2010-11-21 22:26:12 -0500
committerDavid S. Miller <davem@davemloft.net>2010-11-28 01:57:48 -0500
commit8475ef9fd16cadbfc692f78e608d1941a340beb2 (patch)
tree6e582cc6eed642094c87fd1075bc0d7eade41602 /net
parent4cb6a614ba0e58cae8abdadbf73bcb4d37a3f599 (diff)
netns: Don't leak others' openreq-s in proc
The /proc/net/tcp leaks openreq sockets from other namespaces. Signed-off-by: Pavel Emelyanov <xemul@parallels.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/tcp_ipv4.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 69ccbc1dde9c..e13da6de1fc7 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -2043,7 +2043,9 @@ get_req:
2043 } 2043 }
2044get_sk: 2044get_sk:
2045 sk_nulls_for_each_from(sk, node) { 2045 sk_nulls_for_each_from(sk, node) {
2046 if (sk->sk_family == st->family && net_eq(sock_net(sk), net)) { 2046 if (!net_eq(sock_net(sk), net))
2047 continue;
2048 if (sk->sk_family == st->family) {
2047 cur = sk; 2049 cur = sk;
2048 goto out; 2050 goto out;
2049 } 2051 }