net: make sock diag per-namespace
Before this patch sock_diag works for init_net only and dumps information about sockets from all namespaces. This patch expands sock_diag for all name-spaces. It creates a netlink kernel socket for each netns and filters data during dumping. v2: filter accoding with netns in all places remove an unused variable. Cc: "David S. Miller" <davem@davemloft.net> Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> Cc: James Morris <jmorris@namei.org> Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org> Cc: Patrick McHardy <kaber@trash.net> Cc: Pavel Emelyanov <xemul@parallels.com> CC: Eric Dumazet <eric.dumazet@gmail.com> Cc: linux-kernel@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by:Andrew Vagin <avagin@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
Showing
- include/linux/sock_diag.h 0 additions, 1 deletioninclude/linux/sock_diag.h
- include/net/net_namespace.h 1 addition, 0 deletionsinclude/net/net_namespace.h
- net/core/sock_diag.c 20 additions, 7 deletionsnet/core/sock_diag.c
- net/ipv4/inet_diag.c 16 additions, 5 deletionsnet/ipv4/inet_diag.c
- net/ipv4/udp_diag.c 7 additions, 3 deletionsnet/ipv4/udp_diag.c
- net/unix/diag.c 7 additions, 2 deletionsnet/unix/diag.c
Please register or sign in to comment