From owner-freebsd-ipfw@freebsd.org Mon Jul 30 02:58:14 2018 Return-Path: Delivered-To: freebsd-ipfw@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4A10D1045E0D for ; Mon, 30 Jul 2018 02:58:14 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id DC081848BD for ; Mon, 30 Jul 2018 02:58:13 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 9D3F41045E0C; Mon, 30 Jul 2018 02:58:13 +0000 (UTC) Delivered-To: ipfw@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A2311045E0B for ; Mon, 30 Jul 2018 02:58:13 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0F45B848B7 for ; Mon, 30 Jul 2018 02:58:13 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 5419A1D109 for ; Mon, 30 Jul 2018 02:58:12 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w6U2wCat031831 for ; Mon, 30 Jul 2018 02:58:12 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w6U2wCij031829 for ipfw@FreeBSD.org; Mon, 30 Jul 2018 02:58:12 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: ipfw@FreeBSD.org Subject: [Bug 225536] ipfw tcp-setmss doesn't seems to work Date: Mon, 30 Jul 2018 02:58:12 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 11.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: avernar@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: ipfw@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jul 2018 02:58:14 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D225536 --- Comment #8 from John Zielinski --- The incorrect network order byte compare on a little endian processor expla= ins exactly what Emmanuel is seeing. An mss of 8960 (0x0023 network order) which is compared <=3D to the desired= mss of 1460 (0xB405 network order) will be true and break out before setting the mss. The test value of 1400 (0x7805 network order) will also break out. In the case where the locally generated traffic worked with the 1400 rule I suspect the mss was 1460 already. So 1460 (0xB405 network order) <=3D 1400 (0x7805 network order) is false, since we're comparing the network order values, we don't break and go on to set the mss in the packet. People using it for the usual PPPoE clamp would normally not notice on norm= al 1460 mss packets. The 1460 (0xB405 network order) <=3D 1452 (0xAC05 netwo= rk order) test would be false and the mss would be changed. Any device using = an mss less than 1460 might have its mss increased. This bug also affects me as I also use MTU 9000 (mss 8960) on my internal network. After I applied my patch and reloaded the kernel module it started working and setting the mss properly. --=20 You are receiving this mail because: You are the assignee for the bug.=