• Cyrill Gorcunov's avatar
    sockets: Restore unbound inet sockets v5 · 37131e51
    Cyrill Gorcunov authored
    v2:
     - Use do_dump_opt in dump_socket to not call
       lookup_socket redundantly
    
    v3:
     - use getsockopt to check that unconnected
       socket has no peername and it's not listening
     - do test only socket protocol since family and
       type will be called in dump_one_inet_fd.
    
    v4:
     - Move proto tests to can_dump_inet_sk
     - Use SOL_TCP/TCP_INFO to gather info about tcp sockets
    
    v5:
     - hash unconnected sockets to run BUG_ON(already-dumped) logic
     - no default value for sk->wqlen, use zero from xzalloc
     - drop bogus xfree on error
    Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
    Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
    37131e51
sockets.c 8.01 KB