summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authordillon <dillon@FreeBSD.org>2002-12-14 07:31:51 +0000
committerdillon <dillon@FreeBSD.org>2002-12-14 07:31:51 +0000
commitc366943770e3324b93b9c11b53a443b2a1ecf9a4 (patch)
treeddc8f86d248a104e77a46a79abe54a831af4f445 /sys
parent766e48456088359c365ab659a0a92186ab8e4801 (diff)
downloadFreeBSD-src-c366943770e3324b93b9c11b53a443b2a1ecf9a4.zip
FreeBSD-src-c366943770e3324b93b9c11b53a443b2a1ecf9a4.tar.gz
Bruce forwarded this tidbit from an analysis Van Jacobson did on an
apparent ack-on-ack problem with FreeBSD. Prof. Jacobson noticed a case in our TCP stack which would acknowledge a received ack-only packet, which is not legal in TCP. Submitted by: Van Jacobson <van@packetdesign.com>, bmah@packetdesign.com (Bruce A. Mah) MFC after: 7 days
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/tcp_input.c7
-rw-r--r--sys/netinet/tcp_reass.c7
2 files changed, 12 insertions, 2 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index 110a870..31f9b05 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -1463,7 +1463,12 @@ trimthenstep6:
tcpstat.tcps_rcvduppack++;
tcpstat.tcps_rcvdupbyte += tlen;
tcpstat.tcps_pawsdrop++;
- goto dropafterack;
+ if (tlen) {
+ goto dropafterack;
+ } else {
+ printf("PAWS ack-on-ack loop avoided\n");
+ goto drop;
+ }
}
}
diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c
index 110a870..31f9b05 100644
--- a/sys/netinet/tcp_reass.c
+++ b/sys/netinet/tcp_reass.c
@@ -1463,7 +1463,12 @@ trimthenstep6:
tcpstat.tcps_rcvduppack++;
tcpstat.tcps_rcvdupbyte += tlen;
tcpstat.tcps_pawsdrop++;
- goto dropafterack;
+ if (tlen) {
+ goto dropafterack;
+ } else {
+ printf("PAWS ack-on-ack loop avoided\n");
+ goto drop;
+ }
}
}
OpenPOWER on IntegriCloud