From owner-freebsd-bugs Thu Feb 27 5: 0:31 2003 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 78EE537B401 for ; Thu, 27 Feb 2003 05:00:28 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 713D143FE0 for ; Thu, 27 Feb 2003 05:00:27 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id h1RD0RNS068027 for ; Thu, 27 Feb 2003 05:00:27 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id h1RD0Rjd068026; Thu, 27 Feb 2003 05:00:27 -0800 (PST) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4214337B401 for ; Thu, 27 Feb 2003 04:53:44 -0800 (PST) Received: from mpool.st.simbirsk.su (mpool.vinf.ru [213.242.40.129]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4058943FCB for ; Thu, 27 Feb 2003 04:53:41 -0800 (PST) (envelope-from alexd@orlando.vinf.ru) Received: from orlando.vinf.ru (root@orlando.vinf.ru [213.242.40.138]) by mpool.st.simbirsk.su (8.11.2-MVC-VI/8.11.2) with ESMTP id h1RCrZE14678; Thu, 27 Feb 2003 15:53:36 +0300 (MSK) (envelope-from alexd@orlando.vinf.ru) Received: from orlando.vinf.ru (alexd@localhost [127.0.0.1]) by orlando.vinf.ru (8.12.6/8.11.4) with ESMTP id h1RCrZnt006554; Thu, 27 Feb 2003 15:53:35 +0300 (MSK) (envelope-from alexd@orlando.vinf.ru) Received: (from alexd@localhost) by orlando.vinf.ru (8.12.6/8.12.6/Submit) id h1RCrYU2006553; Thu, 27 Feb 2003 15:53:34 +0300 (MSK) Message-Id: <200302271253.h1RCrYU2006553@orlando.vinf.ru> Date: Thu, 27 Feb 2003 15:53:34 +0300 (MSK) From: "Alex L. Demidov" Reply-To: "Alex L. Demidov" To: FreeBSD-gnats-submit@FreeBSD.org Cc: alexd@vinf.ru X-Send-Pr-Version: 3.113 Subject: kern/48741: ipnat corrupts packets on gre interface with rules Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 48741 >Category: kern >Synopsis: ipnat corrupts packets on gre interface with rules >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Feb 27 05:00:26 PST 2003 >Closed-Date: >Last-Modified: >Originator: Alex L. Demidov >Release: FreeBSD 4.7-STABLE i386 >Organization: Variant-Inform ISP >Environment: System: FreeBSD orlando.vinf.ru 4.7-STABLE FreeBSD 4.7-STABLE #13: Tue Jan 21 20:29:38 MSK 2003 root@orlando.vinf.ru:/.ftp/obj/.src/src/sys/ORLANDO i386 >Description: When using ipnat rules for redirecting packets incoming on gre interface, ipnat replaces destination ip:port pair (right) and swaps destination ip:port with source ip:port (?!). >How-To-Repeat: initialize gre tunnel initialize ipnat $ echo 'rdr gre0 0.0.0.0/0 port 80 -> ${server} port 3128 tcp' > ipnat.rules $ ipnat -CF -f ipnat.rules generate some traffice from host ${client} incoming to gre interface with destination port = 80. $ tcpdump -v -i gre0 src host ${client} and dst port 80 and another instance of tcpdump $ tcpdump -v -i ${primary_interface} src host ${server} and src port 3128 and dst host ${client} You will see something like I captured today: gre0: 1:50:31.024708 ${client}.4867 > ${somehost}.http: S [tcp sum ok] 2382677246:2382677246(0) win 8760 (DF) (ttl 125, id 60400, len 48) xl0: 01:50:31.024771 ${server}.3128 > ${client}.4867: S [tcp sum ok] 175447728:175447728(0) ack 2382677247 win 57344 (DF) (ttl 64, id 6641, len 44, bad cksum 0!) gre0: 01:50:33.989896 ${client}.4867 > ${somehost}.http: S [tcp sum ok] 2382677246:2382677246(0) win 8760 (DF) (ttl 125, id 60402, len 48) xl0: 1:50:33.989953 ${server}.3128 > ${client}.4867: S [tcp sum ok] 175447728:175447728(0) ack 2382677247 win 57344 (DF) (ttl 64, id 6661, len 44, bad cksum 0!) >Fix: Don't know. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message