aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2008-11-20 03:58:08 -0500
committerPatrick McHardy <kaber@trash.net>2008-11-20 03:58:08 -0500
commit61d3015808d877eb4ea225b5924feb128b0c1bc7 (patch)
tree55e7ca8fd9ead7df7be4b8cdbd1530a95550a2ea /net/ipv6
parentb0ceb560a4119f187dc50da655be389cb54ae4f9 (diff)
netfilter: ip6table_filter: merge LOCAL_IN and FORWARD hooks
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/netfilter/ip6table_filter.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/net/ipv6/netfilter/ip6table_filter.c b/net/ipv6/netfilter/ip6table_filter.c
index b110a8a85a14..40d2e36d8fac 100644
--- a/net/ipv6/netfilter/ip6table_filter.c
+++ b/net/ipv6/netfilter/ip6table_filter.c
@@ -61,7 +61,7 @@ static struct xt_table packet_filter = {
61 61
62/* The work comes in here from netfilter.c. */ 62/* The work comes in here from netfilter.c. */
63static unsigned int 63static unsigned int
64ip6t_local_in_hook(unsigned int hook, 64ip6t_in_hook(unsigned int hook,
65 struct sk_buff *skb, 65 struct sk_buff *skb,
66 const struct net_device *in, 66 const struct net_device *in,
67 const struct net_device *out, 67 const struct net_device *out,
@@ -72,17 +72,6 @@ ip6t_local_in_hook(unsigned int hook,
72} 72}
73 73
74static unsigned int 74static unsigned int
75ip6t_forward_hook(unsigned int hook,
76 struct sk_buff *skb,
77 const struct net_device *in,
78 const struct net_device *out,
79 int (*okfn)(struct sk_buff *))
80{
81 return ip6t_do_table(skb, hook, in, out,
82 dev_net(in)->ipv6.ip6table_filter);
83}
84
85static unsigned int
86ip6t_local_out_hook(unsigned int hook, 75ip6t_local_out_hook(unsigned int hook,
87 struct sk_buff *skb, 76 struct sk_buff *skb,
88 const struct net_device *in, 77 const struct net_device *in,
@@ -105,14 +94,14 @@ ip6t_local_out_hook(unsigned int hook,
105 94
106static struct nf_hook_ops ip6t_ops[] __read_mostly = { 95static struct nf_hook_ops ip6t_ops[] __read_mostly = {
107 { 96 {
108 .hook = ip6t_local_in_hook, 97 .hook = ip6t_in_hook,
109 .owner = THIS_MODULE, 98 .owner = THIS_MODULE,
110 .pf = PF_INET6, 99 .pf = PF_INET6,
111 .hooknum = NF_INET_LOCAL_IN, 100 .hooknum = NF_INET_LOCAL_IN,
112 .priority = NF_IP6_PRI_FILTER, 101 .priority = NF_IP6_PRI_FILTER,
113 }, 102 },
114 { 103 {
115 .hook = ip6t_forward_hook, 104 .hook = ip6t_in_hook,
116 .owner = THIS_MODULE, 105 .owner = THIS_MODULE,
117 .pf = PF_INET6, 106 .pf = PF_INET6,
118 .hooknum = NF_INET_FORWARD, 107 .hooknum = NF_INET_FORWARD,