summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authoreadler <eadler@FreeBSD.org>2013-12-02 03:11:25 +0000
committereadler <eadler@FreeBSD.org>2013-12-02 03:11:25 +0000
commit4b0ef166458c9fb244b7a29f546d7b192fa91122 (patch)
tree3bf03e51809eb6162879760894e823b019d08db4 /sys/netinet
parent05f6c6f5a16a306a67836346e305c89d896e74da (diff)
downloadFreeBSD-src-4b0ef166458c9fb244b7a29f546d7b192fa91122.zip
FreeBSD-src-4b0ef166458c9fb244b7a29f546d7b192fa91122.tar.gz
In a situation where:
- The remote host sends a FIN - in an ACK for a sequence number for which an ACK has already been received - There is still unacked data on route to the remote host - The packet does not contain a window update The packet may be dropped without processing the FIN flag. PR: kern/99188 Submitted by: Staffan Ulfberg <staffan@ulfberg.se> Discussed with: andre MFC after: never
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/tcp_input.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index 53df1a7..b9e0f42 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -2429,13 +2429,15 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so,
hhook_run_tcp_est_in(tp, th, &to);
if (SEQ_LEQ(th->th_ack, tp->snd_una)) {
- if (tlen == 0 && tiwin == tp->snd_wnd) {
+ if (tlen == 0 && tiwin == tp->snd_wnd &&
+ !(thflags & TH_FIN)) {
TCPSTAT_INC(tcps_rcvdupack);
/*
* If we have outstanding data (other than
* a window probe), this is a completely
* duplicate ack (ie, window info didn't
- * change), the ack is the biggest we've
+ * change and FIN isn't set),
+ * the ack is the biggest we've
* seen and we've seen exactly our rexmt
* threshhold of them, assume a packet
* has been dropped and retransmit it.
OpenPOWER on IntegriCloud