From owner-freebsd-bugs@FreeBSD.ORG Fri Jun 1 21:50:07 2007 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 71C9D16A474 for ; Fri, 1 Jun 2007 21:50:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 62DD813C45B for ; Fri, 1 Jun 2007 21:50:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l51Lo6ck083404 for ; Fri, 1 Jun 2007 21:50:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l51Lo62u083400; Fri, 1 Jun 2007 21:50:06 GMT (envelope-from gnats) Date: Fri, 1 Jun 2007 21:50:06 GMT Message-Id: <200706012150.l51Lo62u083400@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Marcin Cieslak Cc: Subject: Re: kern/111313: packet with IP option corrupted when going through Dummynet X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Marcin Cieslak List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jun 2007 21:50:07 -0000 The following reply was made to PR kern/111313; it has been noted by GNATS. From: Marcin Cieslak To: bug-followup@FreeBSD.org Cc: luping@cs.unc.edu, remko@FreeBSD.org Subject: Re: kern/111313: packet with IP option corrupted when going through Dummynet Date: Fri, 01 Jun 2007 23:13:19 +0200 This modification goes down to the patch listed below. I am experiencing similar problem with IPSec ESP+NAT-T encapsulated packets, so maybe there is something there. (It still applies cleanly to the sys/netinet/ip_output.c revision 1.242.2.15 or even 1.242.2.18 (current as of time of the writing)). -- << Marcin Cieslak // saper@system.pl >> --- ip_output.c Fri Jun 1 22:56:35 2007 +++ ip_output_111313.c Fri Jun 1 22:55:50 2007 @@ -159,6 +159,10 @@ } ip = mtod(m, struct ip *); + /* luping modification */ + struct m_tag *dn_tag; + dn_tag = m_tag_find(m, PACKET_TAG_DUMMYNET, NULL); + /* * Fill in IP header. If we are not allowing fragmentation, * then the ip_id field is meaningless, but we don't set it @@ -172,7 +176,11 @@ */ if ((flags & (IP_FORWARDING|IP_RAWOUTPUT)) == 0) { ip->ip_v = IPVERSION; - ip->ip_hl = hlen >> 2; + //luping modification + if (dn_tag == NULL) + ip->ip_hl = hlen >> 2; + else + hlen = ip->ip_hl << 2; ip->ip_id = ip_newid(); ipstat.ips_localout++; } else {