1. 29 Oct, 2021 4 commits
    • Xin Long's avatar
      sctp: return true only for pathmtu update in sctp_transport_pl_toobig · 75cf662c
      Xin Long authored
      sctp_transport_pl_toobig() supposes to return true only if there's
      pathmtu update, so that in sctp_icmp_frag_needed() it would call
      sctp_assoc_sync_pmtu() and sctp_retransmit(). This patch is to fix
      these return places in sctp_transport_pl_toobig().
      
      Fixes: 83696408 ("sctp: do state transition when receiving an icmp TOOBIG packet")
      Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      75cf662c
    • Xin Long's avatar
      sctp: subtract sctphdr len in sctp_transport_pl_hlen · cc4665ca
      Xin Long authored
      sctp_transport_pl_hlen() is called to calculate the outer header length
      for PL. However, as the Figure in rfc8899#section-4.4:
      
         Any additional
           headers         .--- MPS -----.
                  |        |             |
                  v        v             v
           +------------------------------+
           | IP | ** | PL | protocol data |
           +------------------------------+
      
                      <----- PLPMTU ----->
           <---------- PMTU -------------->
      
      Outer header are IP + Any additional headers, which doesn't include
      Packetization Layer itself header, namely sctphdr, whereas sctphdr
      is counted by __sctp_mtu_payload().
      
      The incorrect calculation caused the link pathmtu to be set larger
      than expected by t->pl.pmtu + sctp_transport_pl_hlen(). This patch
      is to fix it by subtracting sctphdr len in sctp_transport_pl_hlen().
      
      Fixes: d9e2e410 ("sctp: add the constants/variables and states and some APIs for transport")
      Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cc4665ca
    • Xin Long's avatar
      sctp: reset probe_timer in sctp_transport_pl_update · c6ea04ea
      Xin Long authored
      sctp_transport_pl_update() is called when transport update its dst and
      pathmtu, instead of stopping the PLPMTUD probe timer, PLPMTUD should
      start over and reset the probe timer. Otherwise, the PLPMTUD service
      would stop.
      
      Fixes: 92548ec2 ("sctp: add the probe timer in transport for PLPMTUD")
      Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c6ea04ea
    • Xin Long's avatar
      sctp: allow IP fragmentation when PLPMTUD enters Error state · 40171248
      Xin Long authored
      Currently when PLPMTUD enters Error state, transport pathmtu will be set
      to MIN_PLPMTU(512) while probe is continuing with BASE_PLPMTU(1200). It
      will cause pathmtu to stay in a very small value, even if the real pmtu
      is some value like 1000.
      
      RFC8899 doesn't clearly say how to set the value in Error state. But one
      possibility could be keep using BASE_PLPMTU for the real pmtu, but allow
      to do IP fragmentation when it's in Error state.
      
      As it says in rfc8899#section-5.4:
      
         Some paths could be unable to sustain packets of the BASE_PLPMTU
         size.  The Error State could be implemented to provide robustness to
         such paths.  This allows fallback to a smaller than desired PLPMTU
         rather than suffer connectivity failure.  This could utilize methods
         such as endpoint IP fragmentation to enable the PL sender to
         communicate using packets smaller than the BASE_PLPMTU.
      
      This patch is to set pmtu to BASE_PLPMTU instead of MIN_PLPMTU for Error
      state in sctp_transport_pl_send/toobig(), and set packet ipfragok for
      non-probe packets when it's in Error state.
      
      Fixes: 1dc68c19 ("sctp: do state transition when PROBE_COUNT == MAX_PROBES on HB send path")
      Reported-by: default avatarYing Xu <yinxu@redhat.com>
      Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      40171248
  2. 28 Oct, 2021 23 commits
  3. 27 Oct, 2021 13 commits