summaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2010-02-11 18:41:35 +0100
committerPatrick McHardy <kaber@trash.net>2010-02-11 18:41:35 +0100
commitb2907e501945d5d13326a6a7441c13e41cd0e799 (patch)
tree3560769d57cc6acd24d73ca70d39c0400a483712 /net/ipv6
parent9d288dffe3a276e1f06ba556845c456d696c5a4f (diff)
downloadop-kernel-dev-b2907e501945d5d13326a6a7441c13e41cd0e799.zip
op-kernel-dev-b2907e501945d5d13326a6a7441c13e41cd0e799.tar.gz
netfilter: xtables: fix mangle tables
In POST_ROUTING hook, calling dev_net(in) is going to oops. 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_mangle.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/ipv6/netfilter/ip6table_mangle.c b/net/ipv6/netfilter/ip6table_mangle.c
index dc803b7..b6216de 100644
--- a/net/ipv6/netfilter/ip6table_mangle.c
+++ b/net/ipv6/netfilter/ip6table_mangle.c
@@ -81,7 +81,9 @@ ip6table_mangle_hook(unsigned int hook, struct sk_buff *skb,
{
if (hook == NF_INET_LOCAL_OUT)
return ip6t_local_out_hook(hook, skb, out, okfn);
-
+ if (hook == NF_INET_POST_ROUTING)
+ return ip6t_do_table(skb, hook, in, out,
+ dev_net(out)->ipv6.ip6table_mangle);
/* INPUT/FORWARD */
return ip6t_do_table(skb, hook, in, out,
dev_net(in)->ipv6.ip6table_mangle);
OpenPOWER on IntegriCloud