18 #include <linux/module.h>
19 #include <linux/netfilter_ipv6/ip6_tables.h>
20 #include <linux/slab.h>
26 #define SECURITY_VALID_HOOKS (1 << NF_INET_LOCAL_IN) | \
27 (1 << NF_INET_FORWARD) | \
28 (1 << NF_INET_LOCAL_OUT)
30 static const struct xt_table security_table = {
44 const struct net *
net = dev_net((in !=
NULL) ? in : out);
46 return ip6t_do_table(skb, hook, in, out, net->ipv6.ip6table_security);
51 static int __net_init ip6table_security_net_init(
struct net *net)
58 net->ipv6.ip6table_security =
61 return PTR_RET(net->ipv6.ip6table_security);
64 static void __net_exit ip6table_security_net_exit(
struct net *net)
70 .init = ip6table_security_net_init,
71 .exit = ip6table_security_net_exit,
74 static int __init ip6table_security_init(
void)
82 sectbl_ops =
xt_hook_link(&security_table, ip6table_security_hook);
83 if (IS_ERR(sectbl_ops)) {
84 ret = PTR_ERR(sectbl_ops);
95 static void __exit ip6table_security_fini(
void)