]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] don't try to do any NAT on untracked connections
authorHarald Welte <laforge@netfilter.org>
Mon, 8 Aug 2005 09:50:55 +0000 (11:50 +0200)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 8 Aug 2005 18:48:28 +0000 (11:48 -0700)
commit90df71573b17896ca4093e057763aa5e75d5927a
tree89f84bdd6a13763882636913852c6ce2eaea199c
parent4bb1d15cca38a3c89c1a4dc1f9735c5c14278293
[PATCH] don't try to do any NAT on untracked connections

With the introduction of 'rustynat' in 2.6.11, the old tricks of preventing
NAT of 'untracked' connections (e.g. NOTRACK target in 'raw' table) are no
longer sufficient.

The ip_conntrack_untracked.status |= IPS_NAT_DONE_MASK effectively
prevents iteration of the 'nat' table, but doesn't prevent nat_packet()
to be executed.  Since nr_manips is gone in 'rustynat', nat_packet() now
implicitly thinks that it has to do NAT on the packet.

This patch fixes that problem by explicitly checking for
ip_conntrack_untracked in ip_nat_fn().

Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
net/ipv4/netfilter/ip_nat_standalone.c