netfilter: nf_nat: don't check for port change on ICMP tuples
authorUlrich Weber <ulrich.weber@sophos.com>
Thu, 25 Oct 2012 05:34:45 +0000 (05:34 +0000)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 6 Dec 2012 11:20:10 +0000 (11:20 +0000)
commit5c1972f1b4f784560003075e05dcd95c1db8116e
treeefbb75cd9f1f554ae5a9b24f17c0ca9555531e51
parent58fd4b237523afd2a925ccc664d35f0334da4ffd
netfilter: nf_nat: don't check for port change on ICMP tuples

commit 38fe36a248ec3228f8e6507955d7ceb0432d2000 upstream.

ICMP tuples have id in src and type/code in dst.
So comparing src.u.all with dst.u.all will always fail here
and ip_xfrm_me_harder() is called for every ICMP packet,
even if there was no NAT.

Signed-off-by: Ulrich Weber <ulrich.weber@sophos.com>
[Pablo Neira Ayuso: Backported to.3.0]
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
net/ipv4/netfilter/nf_nat_standalone.c