netfilter: nf_nat: Also handle non-ESTABLISHED routing changes in MASQUERADE
authorAndrew Collins <bsderandrew@gmail.com>
Wed, 12 Dec 2012 14:23:49 +0000 (14:23 +0000)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sun, 16 Dec 2012 22:28:30 +0000 (23:28 +0100)
commitc65ef8dc7b1c16379b9fc29e925716a10804af43
tree52c8c66e995ea0c8e115a137163be2090561dd3c
parentc6f408996c625cb950cad024f90e50519f94713c
netfilter: nf_nat: Also handle non-ESTABLISHED routing changes in MASQUERADE

Since (a0ecb85 netfilter: nf_nat: Handle routing changes in MASQUERADE
target), the MASQUERADE target handles routing changes which affect
the output interface of a connection, but only for ESTABLISHED
connections.  It is also possible for NEW connections which
already have a conntrack entry to be affected by routing changes.

This adds a check to drop entries in the NEW+conntrack state
when the oif has changed.

Signed-off-by: Andrew Collins <bsderandrew@gmail.com>
Acked-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/ipv4/netfilter/iptable_nat.c
net/ipv6/netfilter/ip6table_nat.c