sctp: reset probe_timer in sctp_transport_pl_update
authorXin Long <lucien.xin@gmail.com>
Thu, 28 Oct 2021 09:36:02 +0000 (05:36 -0400)
committerDavid S. Miller <davem@davemloft.net>
Fri, 29 Oct 2021 11:21:23 +0000 (12:21 +0100)
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: 92548ec2f1f9 ("sctp: add the probe timer in transport for PLPMTUD")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sctp/sctp.h

index 69bab88ad66b1803ceca72dfd8ae9d9cfc06c34d..bc00410223b030bbdaf007f3ff0d2fdee9b571ee 100644 (file)
@@ -653,12 +653,10 @@ static inline void sctp_transport_pl_update(struct sctp_transport *t)
        if (t->pl.state == SCTP_PL_DISABLED)
                return;
 
-       if (del_timer(&t->probe_timer))
-               sctp_transport_put(t);
-
        t->pl.state = SCTP_PL_BASE;
        t->pl.pmtu = SCTP_BASE_PLPMTU;
        t->pl.probe_size = SCTP_BASE_PLPMTU;
+       sctp_transport_reset_probe_timer(t);
 }
 
 static inline bool sctp_transport_pl_enabled(struct sctp_transport *t)