summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authortuexen <tuexen@FreeBSD.org>2015-05-29 13:26:05 +0000
committertuexen <tuexen@FreeBSD.org>2015-05-29 13:26:05 +0000
commit65d8b9f172581f68d55fba63634b033622363875 (patch)
tree11da27a68e2f8a26116ecc0ac1b0fd652147c59e /sys/netinet
parent443fcce7c93616c27ca0748213e5b268ad3dab8e (diff)
downloadFreeBSD-src-65d8b9f172581f68d55fba63634b033622363875.zip
FreeBSD-src-65d8b9f172581f68d55fba63634b033622363875.tar.gz
MFC r280714:
Improve the selection of the destination address of SACK chunks. This fixes https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196755 and is joint work with rrs@.
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/sctp_output.c23
-rw-r--r--sys/netinet/sctp_structs.h1
2 files changed, 4 insertions, 20 deletions
diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c
index 347b269..251d1ff 100644
--- a/sys/netinet/sctp_output.c
+++ b/sys/netinet/sctp_output.c
@@ -10425,32 +10425,17 @@ sctp_send_sack(struct sctp_tcb *stcb, int so_locked
a_chk->sent = SCTP_DATAGRAM_UNSENT;
a_chk->whoTo = NULL;
- if ((asoc->numduptsns) ||
- (!(asoc->last_data_chunk_from->dest_state & SCTP_ADDR_REACHABLE))) {
+ if (!(asoc->last_data_chunk_from->dest_state & SCTP_ADDR_REACHABLE)) {
/*-
- * Ok, we have some duplicates or the destination for the
- * sack is unreachable, lets see if we can select an
- * alternate than asoc->last_data_chunk_from
+ * Ok, the destination for the SACK is unreachable, lets see if
+ * we can select an alternate to asoc->last_data_chunk_from
*/
- if ((asoc->last_data_chunk_from->dest_state & SCTP_ADDR_REACHABLE) &&
- (asoc->used_alt_onsack > asoc->numnets)) {
- /* We used an alt last time, don't this time */
- a_chk->whoTo = NULL;
- } else {
- asoc->used_alt_onsack++;
- a_chk->whoTo = sctp_find_alternate_net(stcb, asoc->last_data_chunk_from, 0);
- }
+ a_chk->whoTo = sctp_find_alternate_net(stcb, asoc->last_data_chunk_from, 0);
if (a_chk->whoTo == NULL) {
/* Nope, no alternate */
a_chk->whoTo = asoc->last_data_chunk_from;
- asoc->used_alt_onsack = 0;
}
} else {
- /*
- * No duplicates so we use the last place we received data
- * from.
- */
- asoc->used_alt_onsack = 0;
a_chk->whoTo = asoc->last_data_chunk_from;
}
if (a_chk->whoTo) {
diff --git a/sys/netinet/sctp_structs.h b/sys/netinet/sctp_structs.h
index b1df17d..8f61cd7 100644
--- a/sys/netinet/sctp_structs.h
+++ b/sys/netinet/sctp_structs.h
@@ -1174,7 +1174,6 @@ struct sctp_association {
struct sctp_scoping scope;
/* flags to handle send alternate net tracking */
- uint8_t used_alt_onsack;
uint8_t used_alt_asconfack;
uint8_t fast_retran_loss_recovery;
uint8_t sat_t3_loss_recovery;
OpenPOWER on IntegriCloud