Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Sep 2004 00:00:55 GMT
From:      Max Laier <max@love2party.net>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/71652: rdr@pf doesnt work properly with fastforwarding
Message-ID:  <200409130000.i8D00tTh050323@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/71652; it has been noted by GNATS.

From: Max Laier <max@love2party.net>
To: freebsd-gnats-submit@FreeBSD.org, xdivac02@stud.fit.vutbr.cz
Cc:  
Subject: Re: kern/71652: rdr@pf doesnt work properly with fastforwarding
Date: Mon, 13 Sep 2004 01:56:42 +0200

 --Boundary-00=_8IORB59XSICYAUR
 Content-Type: text/plain;
   charset="us-ascii"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline
 
 This is caused by a superfluous byte order change in ip_fastfwd.c while the 
 comment in ip_input.c clearly states what is expected:
     /*
      * ip_fastforward firewall changed dest to local.
      * We expect ip_len and ip_off in host byte order.
      */
 
 Diff attached and on: 
 http://people.freebsd.org/~mlaier/FASTFWD_OURS.byteorder.diff
 
 -- 
  Max
 
 --Boundary-00=_8IORB59XSICYAUR
 Content-Type: text/x-diff;
   charset="us-ascii";
   name="FASTFWD_OURS.byteorder.diff"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
 	filename="FASTFWD_OURS.byteorder.diff"
 
 Index: ip_fastfwd.c
 ===================================================================
 RCS file: /usr/store/mlaier/fcvs/src/sys/netinet/ip_fastfwd.c,v
 retrieving revision 1.19
 diff -u -r1.19 ip_fastfwd.c
 --- ip_fastfwd.c	27 Aug 2004 15:32:28 -0000	1.19
 +++ ip_fastfwd.c	12 Sep 2004 23:50:34 -0000
 @@ -465,16 +465,15 @@
  		if (in_localip(dest) || m->m_flags & M_FASTFWD_OURS) {
  #endif /* IPFIREWALL_FORWARD */
  forwardlocal:
 -			/* for ip_input */
 -			m->m_flags |= M_FASTFWD_OURS;
 -			ip->ip_len = htons(ip->ip_len);
 -			ip->ip_off = htons(ip->ip_off);
 -
  			/*
  			 * Return packet for processing by ip_input()
 +			 * Keep host byte order as excepted at ip_input's
 +			 * "ours"-label
  			 */
 +			m->m_flags |= M_FASTFWD_OURS;
  			if (ro.ro_rt)
  				RTFREE(ro.ro_rt);
 +
  			return 0;
  		}
  		/*
 
 --Boundary-00=_8IORB59XSICYAUR--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200409130000.i8D00tTh050323>