Skip to content

Commit

Permalink
Improve the handling of receiving unordered and unreliable user
Browse files Browse the repository at this point in the history
messages using DATA chunks. Don't use fsn_included when not being
sure that it is set to an appropriate value. If the default is
used, which is -1, this can result in SCTP associaitons not
making any user visible progress.

Thanks to Yutaka Takeda for reporting this issue for the the
userland stack in pion/sctp#138.

MFC after:		3 days
  • Loading branch information
tuexen authored and qwattash committed Nov 23, 2020
2 parents fa2e17c + b7ccaad commit 5dfb1b7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sys/netinet/sctp_indata.c
Original file line number Diff line number Diff line change
Expand Up @@ -5403,7 +5403,9 @@ sctp_flush_reassm_for_str_seq(struct sctp_tcb *stcb,
* it can be delivered... But for now we just dump everything on the
* queue.
*/
if (!asoc->idata_supported && !ordered && SCTP_TSN_GT(control->fsn_included, cumtsn)) {
if (!asoc->idata_supported && !ordered &&
control->first_frag_seen &&
SCTP_TSN_GT(control->fsn_included, cumtsn)) {
return;
}
TAILQ_FOREACH_SAFE(chk, &control->reasm, sctp_next, nchk) {
Expand Down

0 comments on commit 5dfb1b7

Please sign in to comment.