From owner-freebsd-bugs@freebsd.org Tue Jul 5 22:54:39 2016 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6EC88B7156E for ; Tue, 5 Jul 2016 22:54:39 +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 mx1.freebsd.org (Postfix) with ESMTPS id 53A1117E0 for ; Tue, 5 Jul 2016 22:54:39 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u65Msdlt071896 for ; Tue, 5 Jul 2016 22:54:39 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 210860] [pf] [ip6] Incorrect TCP checksums after rdr Date: Tue, 05 Jul 2016 22:54:39 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.3-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: vieira+fbsd@yubo.be X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: 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-bugs@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jul 2016 22:54:39 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D210860 Bug ID: 210860 Summary: [pf] [ip6] Incorrect TCP checksums after rdr Product: Base System Version: 10.3-STABLE Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: kern Assignee: freebsd-bugs@FreeBSD.org Reporter: vieira+fbsd@yubo.be PF seems to incorrectly computes the checksum of IPv6 TCP packets that it rewrites as part of a simple rdr rule. E.g., with the following rules: table {2001:16d8:ee03::cafe:d00d/128,!::1} rdr pass log on lo0 inet6 proto tcp to -> ::1 port 12300 pass out log route-to lo0 inet6 proto tcp to keep state and while running nc -l ::1 12300 trying nc -vz 2001:16d8:ee03::cafe:d00d 8= 0 to see if any packets get to nc listening on 12300 shows that nothing is recei= ved although tcpdump -n -e -ttt -i pflog0 -vvv shows the following incorrect checksum in rdr: 00:00:00.000000 rule 0..16777216/0(match): pass out on vtnet0: (flowlabel 0x481b8, hlim 64, next-header TCP (6) payload length: 40) 2a03:b0c0:1:d0::425:1001.29559 > 2001:16d8:ee03::cafe:d00d.80: Flags [S], c= ksum 0xafd2 (incorrect -> 0x7083), seq 417394668, win 65535, options [mss 1440,nop,wscale 6,sackOK,TS val 240470 ecr 0], length 0 00:00:00.000049 rule 0..16777216/0(match): rdr in on lo0: (flowlabel 0x481b= 8, hlim 64, next-header TCP (6) payload length: 40) 2a03:b0c0:1:d0::425:1001.2= 9559 > ::1.12300: Flags [S], cksum 0x3fff (incorrect -> 0x00b0), seq 417394668, = win 65535, options [mss 1440,nop,wscale 6,sackOK,TS val 240470 ecr 0], length 0 tcpdump'ing lo0 repeatedly shows "cksum 0xafd2 (incorrect -> 0x...)": 22:51:58.407819 IP6 (flowlabel 0x4766f, hlim 64, next-header TCP (6) payload length: 40) fbsd.yubo.be.10904 > 2001:16d8:ee03::cafe:d00d.http: Flags [S], cksum 0xafd2 (incorrect -> 0x12d1), seq 1237643503, win 65535, options [mss 1440,nop,wscale 6,sackOK,TS val 401406 ecr 0], length 0 22:52:01.438778 IP6 (flowlabel 0x4766f, hlim 64, next-header TCP (6) payload length: 40) fbsd.yubo.be.10904 > 2001:16d8:ee03::cafe:d00d.http: Flags [S], cksum 0xafd2 (incorrect -> 0x06fb), seq 1237643503, win 65535, options [mss 1440,nop,wscale 6,sackOK,TS val 404436 ecr 0], length 0 Note that the inet version of the same rules do work as expected, e.g. table {188.113.88.193/32,!127.0.0.1/8} rdr pass on lo0 inet proto tcp to -> 127.0.0.1 port 12300 pass out route-to lo0 inet proto tcp to keep state --=20 You are receiving this mail because: You are the assignee for the bug.=