Skip to content
  • Erik Hugne's avatar
    tipc: allow implicit connect for stream sockets · 5d21cb70
    Erik Hugne authored
    
    
    TIPC's implied connect feature, aka piggyback connect, allows
    applications to save one syscall and all SYN/SYN-ACK signalling
    overhead when setting up a connection.  Until now, this has only
    been supported for SEQPACKET sockets.  Here, we make it possible
    to use this feature even with stream sockets.
    
    At the connecting side, the connection is completed when the
    first data message arrives from the accepting peer.  This means
    that we must allow the connecting user to call blocking recv()
    before the socket has reached state SS_CONNECTED.  So we must must
    relax the state machine check at recv_stream(), and allow the
    recv() call even if socket is in state SS_CONNECTING.
    
    Signed-off-by: default avatarErik Hugne <erik.hugne@ericsson.com>
    Signed-off-by: default avatarJon Maloy <jon.maloy@ericsson.com>
    Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    5d21cb70