]> git.baikalelectronics.ru Git - kernel.git/commitdiff
Revert "sctp: Fix SHUTDOWN CTSN Ack in the peer restart case"
authorXin Long <lucien.xin@gmail.com>
Sun, 2 May 2021 20:36:59 +0000 (04:36 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 3 May 2021 20:30:04 +0000 (13:30 -0700)
This reverts commit b53bcdd57ffea6c53710877d8390bfc6d432ca8e.

This can be reverted as shutdown and cookie_ack chunk are using the
same asoc since commit a18e875b2f47 ("sctp: do asoc update earlier
in sctp_sf_do_dupcook_a").

Reported-by: Jere Leppänen <jere.leppanen@nokia.com>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/sm_make_chunk.c

index 5f9a7c0282740dee596c002c5d7ea4b9821bde99..5b44d228b6cacc720300d9f5951115a95a828163 100644 (file)
@@ -858,11 +858,7 @@ struct sctp_chunk *sctp_make_shutdown(const struct sctp_association *asoc,
        struct sctp_chunk *retval;
        __u32 ctsn;
 
-       if (chunk && chunk->asoc)
-               ctsn = sctp_tsnmap_get_ctsn(&chunk->asoc->peer.tsn_map);
-       else
-               ctsn = sctp_tsnmap_get_ctsn(&asoc->peer.tsn_map);
-
+       ctsn = sctp_tsnmap_get_ctsn(&asoc->peer.tsn_map);
        shut.cum_tsn_ack = htonl(ctsn);
 
        retval = sctp_make_control(asoc, SCTP_CID_SHUTDOWN, 0,