]> git.ipfire.org Git - thirdparty/iptables.git/commit
xtables: fix missing ipt_entry for MASQUERADE target
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 8 Oct 2013 08:50:39 +0000 (10:50 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 30 Dec 2013 22:50:51 +0000 (23:50 +0100)
commit4b7a4afaa240e5d2039e612e125b045d5d1cb7fa
tree21f637d3047580ea76617af38e6fad82c9d7a5c0
parente8cbd65dcef62333b5e461cb264c844065b33e9a
xtables: fix missing ipt_entry for MASQUERADE target

The MASQUERADE target relies on the ipt_entry information that is
set in ->post_parse, which is too late.

Add a new hook called ->pre_parse, that sets the protocol
information accordingly.

Thus:

xtables -4 -A POSTROUTING -t nat -p tcp \
-j MASQUERADE --to-ports 1024

works again.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
iptables/nft-ipv4.c
iptables/nft-ipv6.c
iptables/nft-shared.h
iptables/xtables.c