Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'sctp-bad-revert'

Xin Long says:

====================
sctp: fix the incorrect revert

commit 35b4f24415c8 ("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 instead of revert commit 145cb2f7177d ("sctp: Fix bundling
of SHUTDOWN with COOKIE-ACK"), we should revert 12dfd78e3a74
("sctp: Fix SHUTDOWN CTSN Ack in the peer restart case").
====================

Signed-off-by: David S. Miller <davem@davemloft.net>

+4 -8
+1 -5
net/sctp/sm_make_chunk.c
··· 858 858 struct sctp_chunk *retval; 859 859 __u32 ctsn; 860 860 861 - if (chunk && chunk->asoc) 862 - ctsn = sctp_tsnmap_get_ctsn(&chunk->asoc->peer.tsn_map); 863 - else 864 - ctsn = sctp_tsnmap_get_ctsn(&asoc->peer.tsn_map); 865 - 861 + ctsn = sctp_tsnmap_get_ctsn(&asoc->peer.tsn_map); 866 862 shut.cum_tsn_ack = htonl(ctsn); 867 863 868 864 retval = sctp_make_control(asoc, SCTP_CID_SHUTDOWN, 0,
+3 -3
net/sctp/sm_statefuns.c
··· 1903 1903 */ 1904 1904 sctp_add_cmd_sf(commands, SCTP_CMD_REPLY, SCTP_CHUNK(repl)); 1905 1905 return sctp_sf_do_9_2_start_shutdown(net, ep, asoc, 1906 - SCTP_ST_CHUNK(0), NULL, 1906 + SCTP_ST_CHUNK(0), repl, 1907 1907 commands); 1908 1908 } else { 1909 1909 sctp_add_cmd_sf(commands, SCTP_CMD_NEW_STATE, ··· 5549 5549 * in the Cumulative TSN Ack field the last sequential TSN it 5550 5550 * has received from the peer. 5551 5551 */ 5552 - reply = sctp_make_shutdown(asoc, NULL); 5552 + reply = sctp_make_shutdown(asoc, arg); 5553 5553 if (!reply) 5554 5554 goto nomem; 5555 5555 ··· 6147 6147 disposition = SCTP_DISPOSITION_CONSUME; 6148 6148 if (sctp_outq_is_empty(&asoc->outqueue)) { 6149 6149 disposition = sctp_sf_do_9_2_start_shutdown(net, ep, asoc, type, 6150 - arg, commands); 6150 + NULL, commands); 6151 6151 } 6152 6152 6153 6153 return disposition;