Date: Fri, 29 May 2015 13:26:06 +0000 (UTC) From: Michael Tuexen <tuexen@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283736 - stable/10/sys/netinet Message-ID: <201505291326.t4TDQ66m059159@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tuexen Date: Fri May 29 13:26:05 2015 New Revision: 283736 URL: https://svnweb.freebsd.org/changeset/base/283736 Log: 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@. Modified: stable/10/sys/netinet/sctp_output.c stable/10/sys/netinet/sctp_structs.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/sctp_output.c ============================================================================== --- stable/10/sys/netinet/sctp_output.c Fri May 29 13:24:17 2015 (r283735) +++ stable/10/sys/netinet/sctp_output.c Fri May 29 13:26:05 2015 (r283736) @@ -10425,32 +10425,17 @@ sctp_send_sack(struct sctp_tcb *stcb, in 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) { Modified: stable/10/sys/netinet/sctp_structs.h ============================================================================== --- stable/10/sys/netinet/sctp_structs.h Fri May 29 13:24:17 2015 (r283735) +++ stable/10/sys/netinet/sctp_structs.h Fri May 29 13:26:05 2015 (r283736) @@ -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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201505291326.t4TDQ66m059159>