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@. MFC after: 1 week
This commit is contained in:
parent
73cc817ec8
commit
d59909c3e2
@ -10409,32 +10409,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) {
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user