[AF_KEY]: Fix bug in spdadd
authorKazunori MIYAZAWA <kazunori@miyazawa.org>
Thu, 14 Feb 2008 22:51:38 +0000 (14:51 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 14 Feb 2008 22:51:38 +0000 (14:51 -0800)
This patch fix a BUG when adding spds which have same selector.

Signed-off-by: Kazunori MIYAZAWA <kazunori@miyazawa.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/key/af_key.c

index b3ac85e..1c85392 100644 (file)
@@ -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;
 }