• Kirill Tkhai's avatar
    unix: Add support for restoring receive queue for unix DGRAM sockets · ea747b07
    Kirill Tkhai authored
    Restore a receive queue in cases of:
    
    1)socketpair with closed second end;
    2)peer-less socket, who is a peer for others.
    
    We use here a hack, it is the connect() with AF_UNSPEC family,
    which clears peer of restoring socket. See unix_dgram_connect()
    for the details.
    
    This also makes socket_close_data test working.
    
    SOCK_STREAM is supported in TCP_ESTABLISHED case in the same
    function.
    Signed-off-by: 's avatarKirill Tkhai <ktkhai@virtuozzo.com>
    
    v2: 1)Add a commentary near connect()
        2)Delete test/zdtm/live/static/socket_close_data.desc
    v3: delete ui->ue->peer check
    Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
    ea747b07
sk-unix.c 31.2 KB