diff options
author | Michael Tuexen <tuexen@FreeBSD.org> | 2016-12-09 17:58:07 +0000 |
---|---|---|
committer | Michael Tuexen <tuexen@FreeBSD.org> | 2016-12-09 17:58:07 +0000 |
commit | ebecdad811cd77b49725d13ea6734296d7e79238 (patch) | |
tree | 15ec0172646fcb7fff0d6449d9dd7068bdd0fcf1 /sys/netinet | |
parent | 8d0a31e19c21fbe3bd189bf65079cf9afe7a85b0 (diff) | |
download | src-ebecdad811cd77b49725d13ea6734296d7e79238.tar.gz src-ebecdad811cd77b49725d13ea6734296d7e79238.zip |
Don't bundle a SACK chunk with a SHUTDOWN chunk if it is not required.
MFC after: 1 week
Notes
Notes:
svn path=/head/; revision=309744
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/sctp_indata.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/netinet/sctp_indata.c b/sys/netinet/sctp_indata.c index e36e7ad0fe08..f3776a05e181 100644 --- a/sys/netinet/sctp_indata.c +++ b/sys/netinet/sctp_indata.c @@ -2437,13 +2437,17 @@ sctp_sack_check(struct sctp_tcb *stcb, int was_a_gap) { struct sctp_association *asoc; uint32_t highest_tsn; + int is_a_gap; + sctp_slide_mapping_arrays(stcb); asoc = &stcb->asoc; if (SCTP_TSN_GT(asoc->highest_tsn_inside_nr_map, asoc->highest_tsn_inside_map)) { highest_tsn = asoc->highest_tsn_inside_nr_map; } else { highest_tsn = asoc->highest_tsn_inside_map; } + /* Is there a gap now? */ + is_a_gap = SCTP_TSN_GT(highest_tsn, stcb->asoc.cumulative_tsn); /* * Now we need to see if we need to queue a sack or just start the @@ -2462,13 +2466,10 @@ sctp_sack_check(struct sctp_tcb *stcb, int was_a_gap) } sctp_send_shutdown(stcb, ((stcb->asoc.alternate) ? stcb->asoc.alternate : stcb->asoc.primary_destination)); - sctp_send_sack(stcb, SCTP_SO_NOT_LOCKED); + if (is_a_gap) { + sctp_send_sack(stcb, SCTP_SO_NOT_LOCKED); + } } else { - int is_a_gap; - - /* is there a gap now ? */ - is_a_gap = SCTP_TSN_GT(highest_tsn, stcb->asoc.cumulative_tsn); - /* * CMT DAC algorithm: increase number of packets received * since last ack |