summaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2012-08-26 19:14:14 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2012-08-30 03:00:18 +0200
commitb3f644fc8232ca761da0b5c5ccb6f30b423c4302 (patch)
tree6141514d1bb2046c90f66e93234c3494e658e04c /net/ipv4
parent58a317f1061c894d2344c0b6a18ab4a64b69b815 (diff)
downloadlinux-b3f644fc8232ca761da0b5c5ccb6f30b423c4302.tar.bz2
netfilter: ip6tables: add MASQUERADE target
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/netfilter/ipt_MASQUERADE.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/netfilter/ipt_MASQUERADE.c b/net/ipv4/netfilter/ipt_MASQUERADE.c
index 1c3aa28b51ae..5d5d4d1be9c2 100644
--- a/net/ipv4/netfilter/ipt_MASQUERADE.c
+++ b/net/ipv4/netfilter/ipt_MASQUERADE.c
@@ -99,7 +99,8 @@ device_cmp(struct nf_conn *i, void *ifindex)
if (!nat)
return 0;
-
+ if (nf_ct_l3num(i) != NFPROTO_IPV4)
+ return 0;
return nat->masq_index == (int)(long)ifindex;
}