Skip to content

Commit a52445a

Browse files
committed
Merge branch 'sctp-bad-revert'
Xin Long says: ==================== sctp: fix the incorrect revert commit 35b4f24 ("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 145cb2f ("sctp: Fix bundling of SHUTDOWN with COOKIE-ACK"), we should revert 12dfd78 ("sctp: Fix SHUTDOWN CTSN Ack in the peer restart case"). ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 643001b + 7aa4e54 commit a52445a

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

net/sctp/sm_make_chunk.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -858,11 +858,7 @@ struct sctp_chunk *sctp_make_shutdown(const struct sctp_association *asoc,
858858
struct sctp_chunk *retval;
859859
__u32 ctsn;
860860

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);
866862
shut.cum_tsn_ack = htonl(ctsn);
867863

868864
retval = sctp_make_control(asoc, SCTP_CID_SHUTDOWN, 0,

net/sctp/sm_statefuns.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1903,7 +1903,7 @@ static enum sctp_disposition sctp_sf_do_dupcook_a(
19031903
*/
19041904
sctp_add_cmd_sf(commands, SCTP_CMD_REPLY, SCTP_CHUNK(repl));
19051905
return sctp_sf_do_9_2_start_shutdown(net, ep, asoc,
1906-
SCTP_ST_CHUNK(0), NULL,
1906+
SCTP_ST_CHUNK(0), repl,
19071907
commands);
19081908
} else {
19091909
sctp_add_cmd_sf(commands, SCTP_CMD_NEW_STATE,
@@ -5549,7 +5549,7 @@ enum sctp_disposition sctp_sf_do_9_2_start_shutdown(
55495549
* in the Cumulative TSN Ack field the last sequential TSN it
55505550
* has received from the peer.
55515551
*/
5552-
reply = sctp_make_shutdown(asoc, NULL);
5552+
reply = sctp_make_shutdown(asoc, arg);
55535553
if (!reply)
55545554
goto nomem;
55555555

@@ -6147,7 +6147,7 @@ enum sctp_disposition sctp_sf_autoclose_timer_expire(
61476147
disposition = SCTP_DISPOSITION_CONSUME;
61486148
if (sctp_outq_is_empty(&asoc->outqueue)) {
61496149
disposition = sctp_sf_do_9_2_start_shutdown(net, ep, asoc, type,
6150-
arg, commands);
6150+
NULL, commands);
61516151
}
61526152

61536153
return disposition;

0 commit comments

Comments
 (0)