Browse Source

[AF_KEY]: Fix bug in spdadd

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>
Kazunori MIYAZAWA 17 years ago
parent
commit
a4d6b8af1e
1 changed files with 1 additions and 0 deletions
  1. 1 0
      net/key/af_key.c

+ 1 - 0
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;
 	return 0;
 
 
 out:
 out:
+	xp->dead = 1;
 	xfrm_policy_destroy(xp);
 	xfrm_policy_destroy(xp);
 	return err;
 	return err;
 }
 }