All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH libnetfilter_queue] src: Fix test for IPv6 header
@ 2019-11-24  2:33 Duncan Roe
  2019-12-07  0:23 ` Duncan Roe
  2019-12-07 17:52 ` Pablo Neira Ayuso
  0 siblings, 2 replies; 3+ messages in thread
From: Duncan Roe @ 2019-11-24  2:33 UTC (permalink / raw)
  To: pablo; +Cc: netfilter-devel

Updated:

 src/extra/ipv6.c: Only test the first 4 bits of the putative IPv6 header to be
                   6, since all the other bits are up for grabs.
                   (I have seen nonzero Flow Control on the local interface and
                   RFC2474 & RFC3168 document Traffic Class use).

Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au>
---
 src/extra/ipv6.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/extra/ipv6.c b/src/extra/ipv6.c
index af307d6..f685b3b 100644
--- a/src/extra/ipv6.c
+++ b/src/extra/ipv6.c
@@ -45,7 +45,7 @@ struct ip6_hdr *nfq_ip6_get_hdr(struct pkt_buff *pktb)
 	ip6h = (struct ip6_hdr *)pktb->network_header;
 
 	/* Not IPv6 packet. */
-	if (ip6h->ip6_flow != 0x60)
+	if ((*(uint8_t *)ip6h & 0xf0) != 0x60)
 		return NULL;
 
 	return ip6h;
-- 
2.14.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH libnetfilter_queue] src: Fix test for IPv6 header
  2019-11-24  2:33 [PATCH libnetfilter_queue] src: Fix test for IPv6 header Duncan Roe
@ 2019-12-07  0:23 ` Duncan Roe
  2019-12-07 17:52 ` Pablo Neira Ayuso
  1 sibling, 0 replies; 3+ messages in thread
From: Duncan Roe @ 2019-12-07  0:23 UTC (permalink / raw)
  To: Pablo Neira Ayuso; +Cc: Netfilter Development

Hi Pablo,

On Sun, Nov 24, 2019 at 01:33:10PM +1100, Duncan Roe wrote:
> Updated:
>
>  src/extra/ipv6.c: Only test the first 4 bits of the putative IPv6 header to be
>                    6, since all the other bits are up for grabs.
>                    (I have seen nonzero Flow Control on the local interface and
>                    RFC2474 & RFC3168 document Traffic Class use).
>
> Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au>
> ---
>  src/extra/ipv6.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/extra/ipv6.c b/src/extra/ipv6.c
> index af307d6..f685b3b 100644
> --- a/src/extra/ipv6.c
> +++ b/src/extra/ipv6.c
> @@ -45,7 +45,7 @@ struct ip6_hdr *nfq_ip6_get_hdr(struct pkt_buff *pktb)
>  	ip6h = (struct ip6_hdr *)pktb->network_header;
>
>  	/* Not IPv6 packet. */
> -	if (ip6h->ip6_flow != 0x60)
> +	if ((*(uint8_t *)ip6h & 0xf0) != 0x60)
>  		return NULL;
>
>  	return ip6h;
> --
> 2.14.5
>
This patch is uncontroversial surely?

Cheers ... Duncan.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH libnetfilter_queue] src: Fix test for IPv6 header
  2019-11-24  2:33 [PATCH libnetfilter_queue] src: Fix test for IPv6 header Duncan Roe
  2019-12-07  0:23 ` Duncan Roe
@ 2019-12-07 17:52 ` Pablo Neira Ayuso
  1 sibling, 0 replies; 3+ messages in thread
From: Pablo Neira Ayuso @ 2019-12-07 17:52 UTC (permalink / raw)
  To: Duncan Roe; +Cc: netfilter-devel

Applied, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-12-07 17:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-24  2:33 [PATCH libnetfilter_queue] src: Fix test for IPv6 header Duncan Roe
2019-12-07  0:23 ` Duncan Roe
2019-12-07 17:52 ` Pablo Neira Ayuso

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.