Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8475ef9f authored by Pavel Emelyanov's avatar Pavel Emelyanov Committed by David S. Miller
Browse files

netns: Don't leak others' openreq-s in proc



The /proc/net/tcp leaks openreq sockets from other namespaces.

Signed-off-by: default avatarPavel Emelyanov <xemul@parallels.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4cb6a614
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -2043,7 +2043,9 @@ static void *listening_get_next(struct seq_file *seq, void *cur)
	}
	}
get_sk:
get_sk:
	sk_nulls_for_each_from(sk, node) {
	sk_nulls_for_each_from(sk, node) {
		if (sk->sk_family == st->family && net_eq(sock_net(sk), net)) {
		if (!net_eq(sock_net(sk), net))
			continue;
		if (sk->sk_family == st->family) {
			cur = sk;
			cur = sk;
			goto out;
			goto out;
		}
		}