6 #include <linux/module.h>
7 #include <linux/netfilter_ipv6/ip6_tables.h>
8 #include <linux/slab.h>
10 #define RAW_VALID_HOOKS ((1 << NF_INET_PRE_ROUTING) | (1 << NF_INET_LOCAL_OUT))
12 static const struct xt_table packet_raw = {
26 const struct net *
net = dev_net((in !=
NULL) ? in : out);
28 return ip6t_do_table(skb, hook, in, out, net->ipv6.ip6table_raw);
33 static int __net_init ip6table_raw_net_init(
struct net *net)
40 net->ipv6.ip6table_raw =
43 return PTR_RET(net->ipv6.ip6table_raw);
46 static void __net_exit ip6table_raw_net_exit(
struct net *net)
52 .init = ip6table_raw_net_init,
53 .exit = ip6table_raw_net_exit,
56 static int __init ip6table_raw_init(
void)
65 rawtable_ops =
xt_hook_link(&packet_raw, ip6table_raw_hook);
66 if (IS_ERR(rawtable_ops)) {
67 ret = PTR_ERR(rawtable_ops);
78 static void __exit ip6table_raw_fini(
void)