From owner-svn-src-user@FreeBSD.ORG Fri Nov 2 22:17:11 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1FFFF2DF; Fri, 2 Nov 2012 22:17:11 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E2E348FC16; Fri, 2 Nov 2012 22:17:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id qA2MHAI8013570; Fri, 2 Nov 2012 22:17:10 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id qA2MHAGS013567; Fri, 2 Nov 2012 22:17:10 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201211022217.qA2MHAGS013567@svn.freebsd.org> From: Andre Oppermann Date: Fri, 2 Nov 2012 22:17:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r242498 - user/andre/tcp_workqueue/sys/netinet X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Nov 2012 22:17:11 -0000 Author: andre Date: Fri Nov 2 22:17:10 2012 New Revision: 242498 URL: http://svn.freebsd.org/changeset/base/242498 Log: Reintroduce the SACK required test in syncache_expand() but make it non-fatal and for informative logging only. This way a better overview of real-world behavior can be gained. A previous version of this change slipped into an integrate from head. Modified: user/andre/tcp_workqueue/sys/netinet/tcp_syncache.c Modified: user/andre/tcp_workqueue/sys/netinet/tcp_syncache.c ============================================================================== --- user/andre/tcp_workqueue/sys/netinet/tcp_syncache.c Fri Nov 2 22:07:45 2012 (r242497) +++ user/andre/tcp_workqueue/sys/netinet/tcp_syncache.c Fri Nov 2 22:17:10 2012 (r242498) @@ -991,28 +991,32 @@ syncache_expand(struct in_conninfo *inc, "rejected\n", s, __func__, th->th_seq, sc->sc_irs); goto failed; } + /* - * If timestamps were not negotiated we don't expect them. + * 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. + * RFC1323, Section 3.2 */ - if (!(sc->sc_flags & SCF_TIMESTAMP) && (to->to_flags & TOF_TS)) { + 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__); + log(LOG_DEBUG, "%s; %s: Timestamp missing, " + "rfc violation ignored\n", s, __func__); +#if 0 goto failed; +#endif } + /* - * If timestamps were negotiated every packet is required - * to carry them. - * RFC1323, Section X + * If timestamps were not negotiated we don't expect them. */ - if ((sc->sc_flags & SCF_TIMESTAMP) && !(to->to_flags & TOF_TS)) { + 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 expected, " - "rfc violation ignored\n", s, __func__); -#if 0 + log(LOG_DEBUG, "%s; %s: Timestamp not expected, " + "segment rejected\n", s, __func__); goto failed; -#endif } + /* * If timestamps were negotiated the reflected timestamp * must be equal to what we actually sent in the SYN|ACK.