9 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
10 #include <linux/module.h>
12 #include <linux/ipv6.h>
13 #include <linux/types.h>
17 #include <asm/byteorder.h>
19 #include <linux/netfilter/x_tables.h>
20 #include <linux/netfilter_ipv6/ip6_tables.h>
64 (par->
match == &hbh_mt6_reg[0]) ?
72 oh = skb_header_pointer(skb, ptr,
sizeof(_optsh), &_optsh);
79 if (skb->
len - ptr < hdrlen) {
89 ((optinfo->
hdrlen == hdrlen) ^
104 for (temp = 0; temp < optinfo->
optsnr; temp++) {
108 tp = skb_header_pointer(skb, ptr,
sizeof(_opttype),
114 if (*tp != (optinfo->
opts[temp] & 0xFF00) >> 8) {
116 (optinfo->
opts[temp] & 0xFF00) >> 8);
128 lp = skb_header_pointer(skb, ptr + 1,
133 spec_len = optinfo->
opts[
temp] & 0x00FF;
135 if (spec_len != 0x00FF && spec_len != *lp) {
150 if ((ptr > skb->
len - optlen || hdrlen < optlen) &&
151 temp < optinfo->
optsnr - 1) {
152 pr_debug(
"new pointer is too large!\n");
158 if (temp == optinfo->
optsnr)
177 pr_debug(
"Not strict - not implemented");
191 .checkentry = hbh_mt6_check,
199 .checkentry = hbh_mt6_check,
204 static int __init hbh_mt6_init(
void)
209 static void __exit hbh_mt6_exit(
void)