svn commit: r336893 - head/sys/netinet/tcp_stacks
Randall Stewart
rrs at FreeBSD.org
Mon Jul 30 10:23:30 UTC 2018
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.
More information about the svn-src-head
mailing list