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>
This commit is contained in:
Родитель
4cb6a614ba
Коммит
8475ef9fd1
|
@ -2043,7 +2043,9 @@ get_req:
|
|||
}
|
||||
get_sk:
|
||||
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;
|
||||
goto out;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче