diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2010-02-11 18:41:35 +0100 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2010-02-11 18:41:35 +0100 |
commit | b2907e501945d5d13326a6a7441c13e41cd0e799 (patch) | |
tree | 3560769d57cc6acd24d73ca70d39c0400a483712 /net/ipv4 | |
parent | 9d288dffe3a276e1f06ba556845c456d696c5a4f (diff) | |
download | kernel_goldelico_gta04-b2907e501945d5d13326a6a7441c13e41cd0e799.zip kernel_goldelico_gta04-b2907e501945d5d13326a6a7441c13e41cd0e799.tar.gz kernel_goldelico_gta04-b2907e501945d5d13326a6a7441c13e41cd0e799.tar.bz2 |
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/ipv4')
-rw-r--r-- | net/ipv4/netfilter/iptable_mangle.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/ipv4/netfilter/iptable_mangle.c b/net/ipv4/netfilter/iptable_mangle.c index 58d7097..c833330 100644 --- a/net/ipv4/netfilter/iptable_mangle.c +++ b/net/ipv4/netfilter/iptable_mangle.c @@ -87,7 +87,9 @@ iptable_mangle_hook(unsigned int hook, { if (hook == NF_INET_LOCAL_OUT) return ipt_local_hook(hook, skb, in, out, okfn); - + if (hook == NF_INET_POST_ROUTING) + return ipt_do_table(skb, hook, in, out, + dev_net(out)->ipv4.iptable_mangle); /* PREROUTING/INPUT/FORWARD: */ return ipt_do_table(skb, hook, in, out, dev_net(in)->ipv4.iptable_mangle); |