]> git.baikalelectronics.ru Git - kernel.git/commitdiff
Revert "Revert "sctp: Fix bundling of SHUTDOWN with COOKIE-ACK""
authorXin Long <lucien.xin@gmail.com>
Sun, 2 May 2021 20:36:58 +0000 (04:36 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 3 May 2021 20:30:04 +0000 (13:30 -0700)
This reverts commit 9893b03ecfa830a1852372d80609381ffef5bfe6.

As Jere notice, commit a18e875b2f47 ("sctp: do asoc update earlier
in sctp_sf_do_dupcook_a") only keeps the SHUTDOWN and COOKIE-ACK
with the same asoc, not transport. So we have to bring this patch
back.

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_statefuns.c

index a42844904b8181305a85874adf7a6e916628edc5..5fc3f3a331f89d709c25710f0ab8a5c9a32a818a 100644 (file)
@@ -1903,7 +1903,7 @@ static enum sctp_disposition sctp_sf_do_dupcook_a(
                 */
                sctp_add_cmd_sf(commands, SCTP_CMD_REPLY, SCTP_CHUNK(repl));
                return sctp_sf_do_9_2_start_shutdown(net, ep, asoc,
-                                                    SCTP_ST_CHUNK(0), NULL,
+                                                    SCTP_ST_CHUNK(0), repl,
                                                     commands);
        } else {
                sctp_add_cmd_sf(commands, SCTP_CMD_NEW_STATE,
@@ -5549,7 +5549,7 @@ enum sctp_disposition sctp_sf_do_9_2_start_shutdown(
         * in the Cumulative TSN Ack field the last sequential TSN it
         * has received from the peer.
         */
-       reply = sctp_make_shutdown(asoc, NULL);
+       reply = sctp_make_shutdown(asoc, arg);
        if (!reply)
                goto nomem;
 
@@ -6147,7 +6147,7 @@ enum sctp_disposition sctp_sf_autoclose_timer_expire(
        disposition = SCTP_DISPOSITION_CONSUME;
        if (sctp_outq_is_empty(&asoc->outqueue)) {
                disposition = sctp_sf_do_9_2_start_shutdown(net, ep, asoc, type,
-                                                           arg, commands);
+                                                           NULL, commands);
        }
 
        return disposition;