]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
[NETFILTER]: nf_conntrack: don't track locally generated special ICMP error
authorYasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>
Sun, 22 Jul 2007 16:07:48 +0000 (18:07 +0200)
committerAdrian Bunk <bunk@stusta.de>
Sun, 22 Jul 2007 16:07:48 +0000 (18:07 +0200)
commit1c4f0dd95d9bac9e2b87a627b563bc5d9fb34555
treef87ea9815a839eb2b08021633e4182fd0f7b803c
parent4de632544dbaeabafba6aa42e9a1971ec8eeb022
[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.

Upstream commit ID: 130e7a83d7ec8c5c673225e0fa8ea37b1ed507a5

Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
net/ipv4/netfilter/nf_conntrack_proto_icmp.c