Date: Fri, 1 Jun 2007 21:50:06 GMT From: Marcin Cieslak <saper@SYSTEM.PL> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/111313: packet with IP option corrupted when going through Dummynet Message-ID: <200706012150.l51Lo62u083400@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/111313; it has been noted by GNATS. From: Marcin Cieslak <saper@SYSTEM.PL> 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 {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200706012150.l51Lo62u083400>