• Xin Long's avatar
    sctp: do the basic send and recv for PLPMTUD probe · fe59379b
    Xin Long authored
    This patch does exactly what rfc8899#section-6.2.1.2 says:
    
       The SCTP sender needs to be able to determine the total size of a
       probe packet.  The HEARTBEAT chunk could carry a Heartbeat
       Information parameter that includes, besides the information
       suggested in [RFC4960], the probe size to help an implementation
       associate a HEARTBEAT ACK with the size of probe that was sent.  The
       sender could also use other methods, such as sending a nonce and
       verifying the information returned also contains the corresponding
       nonce.  The length of the PAD chunk is computed by reducing the
       probing size by the size of the SCTP common header and the HEARTBEAT
       chunk.
    
    Note that HB ACK chunk will carry back whatever HB chunk carried, including
    the probe_size we put it in; We also check hbinfo->probe_size in the HB ACK
    against link->pl.probe_size to validate this HB ACK chunk.
    
    v1->v2:
      - Remove the unused 'sp' and add static for sctp_packet_bundle_pad().
    Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
    Acked-by: default avatarMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    fe59379b
sm.h 16 KB