]> git.baikalelectronics.ru Git - kernel.git/commit
[ICMP]: Ensure that ICMP relookup maintains status quo
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 3 Apr 2008 19:52:19 +0000 (12:52 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Apr 2008 19:52:19 +0000 (12:52 -0700)
commite0ff35c2176d2afc2e57e6655d82c3a86301b2af
treeed25908930ea98782ec7a13fd985c9825317a8b2
parent910b8f34dcd6af28a5a47d2a47eaa257a6d6a0e4
[ICMP]: Ensure that ICMP relookup maintains status quo

The ICMP relookup path is only meant to modify behaviour when
appropriate IPsec policies are in place and marked as requiring
relookups.  It is certainly not meant to modify behaviour when
IPsec policies don't exist at all.

However, due to an oversight on the error paths existing behaviour
may in fact change should one of the relookup steps fail.

This patch corrects this by redirecting all errors on relookup
failures to the previous code path.  That is, if the initial
xfrm_lookup let the packet pass, we will stand by that decision
should the relookup fail due to an error.

This should be safe from a security point-of-view because compliant
systems must install a default deny policy so the packet would'nt
have passed in that case.

Many thanks to Julian Anastasov for pointing out this error.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/icmp.c
net/ipv6/icmp.c