summaryrefslogtreecommitdiff
path: root/src/conntrack.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2010-07-01 16:34:17 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2010-07-01 16:34:17 +0200
commitfd3827bc74b6d9e5acb7f5fcf79e6e1cb326640d (patch)
tree03cfd7522d60a6fdaf796762300ed1ed8cc49a24 /src/conntrack.c
parent6c0096535ea7900c190d8456eeb2307a26776141 (diff)
downloadconntrack-tools-fd3827bc74b6d9e5acb7f5fcf79e6e1cb326640d.tar.gz
conntrack-tools-fd3827bc74b6d9e5acb7f5fcf79e6e1cb326640d.zip
conntrack: fix `conntrack --any-nat 1.1.1.1' filtering
This patch adds the missing bits to allow to filter with --any-nat based on the IP address. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/conntrack.c')
-rw-r--r--src/conntrack.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/conntrack.c b/src/conntrack.c
index 93844c5..82fe844 100644
--- a/src/conntrack.c
+++ b/src/conntrack.c
@@ -843,9 +843,9 @@ nat_parse(char *arg, int portok, struct nf_conntrack *obj, int type)
if (parse_addr(arg, &parse) == AF_UNSPEC)
return;
- if (type == CT_OPT_SRC_NAT)
+ if (type == CT_OPT_SRC_NAT || type == CT_OPT_ANY_NAT)
nfct_set_attr_u32(obj, ATTR_SNAT_IPV4, parse.v4);
- else if (type == CT_OPT_DST_NAT)
+ else if (type == CT_OPT_DST_NAT || type == CT_OPT_ANY_NAT)
nfct_set_attr_u32(obj, ATTR_DNAT_IPV4, parse.v4);
}