From 07fd333df37ed096737b5b0d8e04076f74976f00 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Mon, 30 Dec 2002 19:31:04 +0000 Subject: [PATCH] Remove the PAWS ack-on-ack debugging printf(). Note that the original RFC 1323 (PAWS) says in 4.2.1 that the out of order / reverse-time-indexed packet should be acknowledged as specified in RFC-793 page 69 then dropped. The original PAWS code in FreeBSD (1994) simply acknowledged the segment unconditionally, which is incorrect, and was fixed in 1.183 (2002). At the moment we do not do checks for SYN or FIN in addition to (tlen != 0), which may or may not be correct, but the worst that ought to happen should be a retry by the sender. --- sys/netinet/tcp_input.c | 7 ++----- sys/netinet/tcp_reass.c | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index b424add4e4fa..cb52cef4abe8 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -1454,12 +1454,9 @@ trimthenstep6: tcpstat.tcps_rcvduppack++; tcpstat.tcps_rcvdupbyte += tlen; tcpstat.tcps_pawsdrop++; - if (tlen) { + if (tlen) goto dropafterack; - } else { - printf("PAWS ack-on-ack loop avoided\n"); - goto drop; - } + goto drop; } } diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c index b424add4e4fa..cb52cef4abe8 100644 --- a/sys/netinet/tcp_reass.c +++ b/sys/netinet/tcp_reass.c @@ -1454,12 +1454,9 @@ trimthenstep6: tcpstat.tcps_rcvduppack++; tcpstat.tcps_rcvdupbyte += tlen; tcpstat.tcps_pawsdrop++; - if (tlen) { + if (tlen) goto dropafterack; - } else { - printf("PAWS ack-on-ack loop avoided\n"); - goto drop; - } + goto drop; } }