[Devel] [PATCH rh7] net: Exclude foreign sockets from /proc/net/tcp{, 6}
Kirill Tkhai
ktkhai at odin.com
Thu Jul 16 09:59:45 PDT 2015
https://jira.sw.ru/browse/PSBM-34875
Signed-off-by: Kirill Tkhai <ktkhai at odin.com>
---
net/ipv4/tcp_ipv4.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 4125556..aa64e15 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -2263,7 +2263,7 @@ static void *listening_get_next(struct seq_file *seq, void *cur)
}
get_sk:
sk_nulls_for_each_from(sk, node) {
- if (!net_access_allowed(sock_net(sk), net))
+ if (!net_eq(sock_net(sk), net))
continue;
if (sk->sk_family == st->family) {
cur = sk;
@@ -2338,7 +2338,7 @@ static void *established_get_first(struct seq_file *seq)
spin_lock_bh(lock);
sk_nulls_for_each(sk, node, &tcp_hashinfo.ehash[st->bucket].chain) {
if (sk->sk_family != st->family ||
- !net_access_allowed(sock_net(sk), net)) {
+ !net_eq(sock_net(sk), net)) {
continue;
}
rc = sk;
@@ -2364,7 +2364,7 @@ static void *established_get_next(struct seq_file *seq, void *cur)
sk_nulls_for_each_from(sk, node) {
if (sk->sk_family == st->family &&
- net_access_allowed(sock_net(sk), net))
+ net_eq(sock_net(sk), net))
return sk;
}
More information about the Devel
mailing list