Date: Mon, 30 Jul 2018 10:23:29 +0000 (UTC) From: Randall Stewart <rrs@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336893 - head/sys/netinet/tcp_stacks Message-ID: <201807301023.w6UANTbL054914@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rrs Date: Mon Jul 30 10:23:29 2018 New Revision: 336893 URL: https://svnweb.freebsd.org/changeset/base/336893 Log: This fixes a hole where rack could end up sending an invalid segment into the reassembly queue. This would happen if you enabled the data after close option. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D16453 Modified: head/sys/netinet/tcp_stacks/rack.c Modified: head/sys/netinet/tcp_stacks/rack.c ============================================================================== --- head/sys/netinet/tcp_stacks/rack.c Mon Jul 30 09:50:26 2018 (r336892) +++ head/sys/netinet/tcp_stacks/rack.c Mon Jul 30 10:23:29 2018 (r336893) @@ -4657,7 +4657,6 @@ rack_process_data(struct mbuf *m, struct tcphdr *th, s rack = (struct tcp_rack *)tp->t_fb_ptr; INP_WLOCK_ASSERT(tp->t_inpcb); - nsegs = max(1, m->m_pkthdr.lro_nsegs); if ((thflags & TH_ACK) && (SEQ_LT(tp->snd_wl1, th->th_seq) || @@ -4686,6 +4685,10 @@ rack_process_data(struct mbuf *m, struct tcphdr *th, s tp->snd_nxt = tp->snd_max; /* Make sure we output to start the timer */ rack->r_wanted_output++; + } + if (tp->t_flags2 & TF2_DROP_AF_DATA) { + m_freem(m); + return (0); } /* * Process segments with URG.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807301023.w6UANTbL054914>