• Andrey Vagin's avatar
    net: make sock diag per-namespace · 51d7cccf
    Andrey Vagin authored
    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: default avatarAndrew Vagin <avagin@openvz.org>
    Acked-by: default avatarPavel Emelyanov <xemul@parallels.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    51d7cccf
sock_diag.c 5.01 KB