diff options
author | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 2001-07-01 05:16:04 +0000 |
---|---|---|
committer | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 2001-07-01 05:16:04 +0000 |
commit | b2575613f4a2be51ff6ce7f4035c3b081fa92ced (patch) | |
tree | b9ffb3b2937a6d821f8fe7a93d9f51760af46132 | |
parent | 1c514abd79a18048a168e4c685f73334cc2048a1 (diff) |
Don't try to delete unestablished SPIs.
-rw-r--r-- | sbin/isakmpd/pf_key_v2.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sbin/isakmpd/pf_key_v2.c b/sbin/isakmpd/pf_key_v2.c index de06d708f24..5f1dc88192e 100644 --- a/sbin/isakmpd/pf_key_v2.c +++ b/sbin/isakmpd/pf_key_v2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_key_v2.c,v 1.72 2001/06/29 19:08:11 ho Exp $ */ +/* $OpenBSD: pf_key_v2.c,v 1.73 2001/07/01 05:16:03 angelos Exp $ */ /* $EOM: pf_key_v2.c,v 1.79 2000/12/12 00:33:19 niklas Exp $ */ /* @@ -2350,6 +2350,10 @@ pf_key_v2_delete_spi (struct sa *sa, struct proto *proto, int incoming) struct sadb_x_sa2 ssa2; #endif + /* If it's not an established SA, don't proceed. */ + if (!(sa->flags & SA_FLAG_READY)) + return 0; + /* * If the SA was not replaced and was not one acquired through the * kernel (ACQUIRE message), remove the flow associated with it. |