[PATCH] IPSEC: Policy list disorder
commit7fbbb01dca7704d52ace6f45a805c98a5b0362f9
authorHerbert Xu <herbert@gondor.apana.org.au>
Wed, 17 Jan 2007 02:35:01 +0000 (17 13:35 +1100)
committerChris Wright <chrisw@sous-sol.org>
Mon, 5 Feb 2007 16:31:41 +0000 (5 08:31 -0800)
tree92f0faad581beceb69535343affc96e26433d755
parent5624ef14c74b5e8237ef09aba7f5bfd2cb56f793
[PATCH] IPSEC: Policy list disorder

The recent hashing introduced an off-by-one bug in policy list insertion.
Instead of adding after the last entry with a lesser or equal priority,
we're adding after the successor of that entry.

This patch fixes this and also adds a warning if we detect a duplicate
entry in the policy list.  This should never happen due to this if clause.

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