Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Apr 2011 09:00:00 +0200
From:      Luigi Rizzo <rizzo@iet.unipi.it>
To:        Gleb Smirnoff <glebius@freebsd.org>
Cc:        freebsd-ipfw@freebsd.org
Subject:   Re: kern/156180
Message-ID:  <20110406070000.GA8987@onelab2.iet.unipi.it>
In-Reply-To: <201104052130.p35LUElF030950@freefall.freebsd.org>
References:  <201104052130.p35LUElF030950@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Apr 05, 2011 at 09:30:14PM +0000, Gleb Smirnoff wrote:
> The following reply was made to PR kern/156180; it has been noted by GNATS.
> 
> From: Gleb Smirnoff <glebius@FreeBSD.org>
> To: bug-followup@FreeBSD.org
> Cc: ae@FreeBSD.org
> Subject: kern/156180
> Date: Wed, 6 Apr 2011 01:07:29 +0400
> 
>  --5gxpn/Q6ypwruk0T
>  Content-Type: text/plain; charset=koi8-r
>  Content-Disposition: inline

no objection

cheers
luigi

>    What about the following approach? See attached
>  snap, not tested, patch.
>  
>  -- 
>  Totus tuus, Glebius.
>  
>  --5gxpn/Q6ypwruk0T
>  Content-Type: text/x-diff; charset=koi8-r
>  Content-Disposition: attachment; filename="156180.diff"
>  
>  Index: ip_fw2.c
>  ===================================================================
>  --- ip_fw2.c	(revision 220373)
>  +++ ip_fw2.c	(working copy)
>  @@ -913,9 +913,10 @@
>    * pointer might become stale after other pullups (but we never use it
>    * this way).
>    */
>  -#define PULLUP_TO(_len, p, T)					\
>  +#define PULLUP_TO(_len, p, T)	PULLUP_LEN(_len, p, sizeof(T))
>  +#define PULLUP_LEN(_len, p, T)					\
>   do {								\
>  -	int x = (_len) + sizeof(T);				\
>  +	int x = (_len) + T;					\
>   	if ((m)->m_len < x) {					\
>   		args->m = m = m_pullup(m, x);			\
>   		if (m == NULL)					\
>  @@ -1600,6 +1601,7 @@
>   				break;
>   
>   			case O_TCPOPTS:
>  +				PULLUP_LEN(hlen, ulp, (TCP(ulp)->th_off << 2));
>   				match = (proto == IPPROTO_TCP && offset == 0 &&
>   				    tcpopts_match(TCP(ulp), cmd));
>   				break;
>  @@ -2230,6 +2232,7 @@
>   			}
>   
>   		}	/* end of inner loop, scan opcodes */
>  +#undef PULLUP_LEN
>   
>   		if (done)
>   			break;
>  
>  --5gxpn/Q6ypwruk0T--
> _______________________________________________
> freebsd-ipfw@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-ipfw
> To unsubscribe, send any mail to "freebsd-ipfw-unsubscribe@freebsd.org"



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