aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/netfilter/ip6table_filter.c8
-rw-r--r--net/ipv6/netfilter/ip6table_raw.c8
-rw-r--r--net/ipv6/netfilter/ip6table_security.c8
3 files changed, 6 insertions, 18 deletions
diff --git a/net/ipv6/netfilter/ip6table_filter.c b/net/ipv6/netfilter/ip6table_filter.c
index 38074e933f6..866f34ae236 100644
--- a/net/ipv6/netfilter/ip6table_filter.c
+++ b/net/ipv6/netfilter/ip6table_filter.c
@@ -64,13 +64,9 @@ ip6table_filter_hook(unsigned int hook, struct sk_buff *skb,
64 const struct net_device *in, const struct net_device *out, 64 const struct net_device *in, const struct net_device *out,
65 int (*okfn)(struct sk_buff *)) 65 int (*okfn)(struct sk_buff *))
66{ 66{
67 if (hook == NF_INET_LOCAL_OUT) 67 const struct net *net = dev_net((in != NULL) ? in : out);
68 return ip6t_do_table(skb, hook, in, out,
69 dev_net(out)->ipv6.ip6table_filter);
70 68
71 /* INPUT/FORWARD: */ 69 return ip6t_do_table(skb, hook, in, out, net->ipv6.ip6table_filter);
72 return ip6t_do_table(skb, hook, in, out,
73 dev_net(in)->ipv6.ip6table_filter);
74} 70}
75 71
76static struct nf_hook_ops ip6t_ops[] __read_mostly = { 72static struct nf_hook_ops ip6t_ops[] __read_mostly = {
diff --git a/net/ipv6/netfilter/ip6table_raw.c b/net/ipv6/netfilter/ip6table_raw.c
index 985e27cf1e0..5451a36fbc2 100644
--- a/net/ipv6/netfilter/ip6table_raw.c
+++ b/net/ipv6/netfilter/ip6table_raw.c
@@ -48,13 +48,9 @@ ip6table_raw_hook(unsigned int hook, struct sk_buff *skb,
48 const struct net_device *in, const struct net_device *out, 48 const struct net_device *in, const struct net_device *out,
49 int (*okfn)(struct sk_buff *)) 49 int (*okfn)(struct sk_buff *))
50{ 50{
51 if (hook == NF_INET_PRE_ROUTING) 51 const struct net *net = dev_net((in != NULL) ? in : out);
52 return ip6t_do_table(skb, hook, in, out,
53 dev_net(in)->ipv6.ip6table_raw);
54 52
55 /* OUTPUT: */ 53 return ip6t_do_table(skb, hook, in, out, net->ipv6.ip6table_raw);
56 return ip6t_do_table(skb, hook, in, out,
57 dev_net(out)->ipv6.ip6table_raw);
58} 54}
59 55
60static struct nf_hook_ops ip6t_ops[] __read_mostly = { 56static struct nf_hook_ops ip6t_ops[] __read_mostly = {
diff --git a/net/ipv6/netfilter/ip6table_security.c b/net/ipv6/netfilter/ip6table_security.c
index 83585892935..841ea77f521 100644
--- a/net/ipv6/netfilter/ip6table_security.c
+++ b/net/ipv6/netfilter/ip6table_security.c
@@ -69,13 +69,9 @@ ip6table_security_hook(unsigned int hook, struct sk_buff *skb,
69 const struct net_device *out, 69 const struct net_device *out,
70 int (*okfn)(struct sk_buff *)) 70 int (*okfn)(struct sk_buff *))
71{ 71{
72 if (hook == NF_INET_LOCAL_OUT) 72 const struct net *net = dev_net((in != NULL) ? in : out);
73 return ip6t_do_table(skb, hook, in, out,
74 dev_net(out)->ipv6.ip6table_security);
75 73
76 /* INPUT/FORWARD: */ 74 return ip6t_do_table(skb, hook, in, out, net->ipv6.ip6table_security);
77 return ip6t_do_table(skb, hook, in, out,
78 dev_net(in)->ipv6.ip6table_security);
79} 75}
80 76
81static struct nf_hook_ops ip6t_ops[] __read_mostly = { 77static struct nf_hook_ops ip6t_ops[] __read_mostly = {