From owner-p4-projects@FreeBSD.ORG Sun Jun 21 20:45:59 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C93C01065675; Sun, 21 Jun 2009 20:45:58 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88C9E1065673 for ; Sun, 21 Jun 2009 20:45:58 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 775148FC18 for ; Sun, 21 Jun 2009 20:45:58 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n5LKjwmA066206 for ; Sun, 21 Jun 2009 20:45:58 GMT (envelope-from andre@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n5LKjw6H066204 for perforce@freebsd.org; Sun, 21 Jun 2009 20:45:58 GMT (envelope-from andre@freebsd.org) Date: Sun, 21 Jun 2009 20:45:58 GMT Message-Id: <200906212045.n5LKjw6H066204@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to andre@freebsd.org using -f From: Andre Oppermann To: Perforce Change Reviews Cc: Subject: PERFORCE change 164830 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2009 20:45:59 -0000 http://perforce.freebsd.org/chv.cgi?CH=164830 Change 164830 by andre@andre_t61 on 2009/06/21 20:45:25 Undo the following changes which happend before the branch point of tcp_new. The original version was correct based on a full reading of RFC1323 and the consesus of IETF TCPM. Eventually the problem this was supposed to solve had a different origin. See mainling list archives. svn r173771 silby Comment out the syncache's test which ensures that hosts which negotiate TCP timestamps in the initial SYN packet actually use them in the rest of the connection. Unfortunately, during the 7.0 testing cycle users have already found network devices that violate this constraint. RFC 1323 states 'and may send a TSopt in other segments' rather than 'and MUST send', so we must allow it. svn r174545 kmacy Remove spurious timestamp check. RFC 1323 explicitly states that timestamps MAY be transmitted if negotiated. Affected files ... .. //depot/projects/tcp_new/netinet/tcp_syncache.c#3 edit Differences ... ==== //depot/projects/tcp_new/netinet/tcp_syncache.c#3 (text+ko) ==== @@ -917,12 +917,24 @@ goto failed; } + /* + * If timestamps were present in the SYN and we accepted + * them in our SYN|ACK we require them to be present from + * now on. And vice versa. + */ + if ((sc->sc_flags & SCF_TIMESTAMP) && !(to->to_flags & TOF_TS)) { + if ((s = tcp_log_addrs(inc, th, NULL, NULL))) + log(LOG_DEBUG, "%s; %s: Timestamp missing, " + "segment rejected\n", s, __func__); + goto failed; + } if (!(sc->sc_flags & SCF_TIMESTAMP) && (to->to_flags & TOF_TS)) { if ((s = tcp_log_addrs(inc, th, NULL, NULL))) log(LOG_DEBUG, "%s; %s: Timestamp not expected, " "segment rejected\n", s, __func__); goto failed; } + /* * If timestamps were negotiated the reflected timestamp * must be equal to what we actually sent in the SYN|ACK.