diff options
author | Duncan Roe <duncan_roe@optusnet.com.au> | 2019-11-24 13:33:10 +1100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2019-12-07 18:51:38 +0100 |
commit | 12c57417585e9ddafd52135cb770823cdb8d44a1 (patch) | |
tree | 6679ef6e8adadf8a616a21a908eb514d8eaf7751 /src/extra/ipv6.c | |
parent | 7eaa79d583d6883da22af2b7dba1790d8aa62a90 (diff) |
src: Fix test for IPv6 header
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>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/extra/ipv6.c')
-rw-r--r-- | src/extra/ipv6.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |