]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
nf_conntrack: don't track locally generated special ICMP error
authorYasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>
Tue, 17 Jul 2007 15:25:10 +0000 (17:25 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 9 Aug 2007 21:27:46 +0000 (14:27 -0700)
commit6b870a3938061b49a19b2e76ae1ddec967e6fb0f
tree7d5774fa199f28ed3289e7be669aec8c034c9b25
parentb3c5cf79540eb7c65047c917897a1a69ba6aed3e
nf_conntrack: don't track locally generated special ICMP error

[NETFILTER]: nf_conntrack: don't track locally generated special ICMP error

The conntrack assigned to locally generated ICMP error is usually the one
assigned to the original packet which has caused the error. But if
the original packet is handled as invalid by nf_conntrack, no conntrack
is assigned to the original packet. Then nf_ct_attach() cannot assign
any conntrack to the ICMP error packet. In that case the current
nf_conntrack_icmp assigns appropriate conntrack to it. But the current
code mistakes the direction of the packet. As a result, NAT code mistakes
the address to be mangled.

To fix the bug, this changes nf_conntrack_icmp not to assign conntrack
to such ICMP error. Actually no address is necessary to be mangled
in this case.

Spotted by Jordan Russell.

Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>
Upstream commit ID: 130e7a83d7ec8c5c673225e0fa8ea37b1ed507a5

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/ipv4/netfilter/nf_conntrack_proto_icmp.c