From: Kazunori MIYAZAWA Date: Thu, 14 Feb 2008 22:51:38 +0000 (-0800) Subject: [AF_KEY]: Fix bug in spdadd X-Git-Tag: v2.6.25-rc2~2^2~4 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=a4d6b8af1e92daa872f55d06415b76c35f44d8bd;p=linux-2.6-omap-h63xx.git [AF_KEY]: Fix bug in spdadd This patch fix a BUG when adding spds which have same selector. Signed-off-by: Kazunori MIYAZAWA Signed-off-by: David S. Miller --- diff --git a/net/key/af_key.c b/net/key/af_key.c index b3ac85e808a..1c853927810 100644 --- a/net/key/af_key.c +++ b/net/key/af_key.c @@ -2291,6 +2291,7 @@ static int pfkey_spdadd(struct sock *sk, struct sk_buff *skb, struct sadb_msg *h return 0; out: + xp->dead = 1; xfrm_policy_destroy(xp); return err; }