]> err.no Git - linux-2.6/commit
[IPSEC]: Fix zero return value in xfrm_lookup on error
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 13 Dec 2007 17:30:59 +0000 (09:30 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 22:57:54 +0000 (14:57 -0800)
commitaef21785995778f710a60b563e03bf53ba455a47
tree5deeca8578e5b8d0198144b9dc2b281f8789a3df
parentcf86314cb7460423b0b7e611edad80a52dc90d10
[IPSEC]: Fix zero return value in xfrm_lookup on error

Further testing shows that my ICMP relookup patch can cause xfrm_lookup
to return zero on error which isn't very nice since it leads to the caller
dying on null pointer dereference.  The bug is due to not setting err
to ENOENT just before we leave xfrm_lookup in case of no policy.

This patch moves the err setting to where it should be.

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