• Florian Westphal's avatar
    tcp: merge 'init_req' and 'route_req' functions · 7ea851d1
    Florian Westphal authored
    The Multipath-TCP standard (RFC 8684) says that an MPTCP host should send
    a TCP reset if the token in a MP_JOIN request is unknown.
    
    At this time we don't do this, the 3whs completes and the 'new subflow'
    is reset afterwards.  There are two ways to allow MPTCP to send the
    reset.
    
    1. override 'send_synack' callback and emit the rst from there.
       The drawback is that the request socket gets inserted into the
       listeners queue just to get removed again right away.
    
    2. Send the reset from the 'route_req' function instead.
       This avoids the 'add&remove request socket', but route_req lacks the
       skb that is required to send the TCP reset.
    
    Instead of just adding the skb to that function for MPTCP sake alone,
    Paolo suggested to merge init_req and route_req functions.
    
    This saves one indirection from syn processing path and provides the skb
    to the merged function at the same time.
    
    'send reset on unknown mptcp join token' is added in next patch.
    Suggested-by: default avatarPaolo Abeni <pabeni@redhat.com>
    Cc: Eric Dumazet <edumazet@google.com>
    Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    7ea851d1
tcp_ipv6.c 57.1 KB