summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>2000-12-02 02:08:18 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>2000-12-02 02:08:18 +0000
commit040b6288f1dcd05751855706b2345fb69f121e6f (patch)
tree65adb6edf2b9ac0669b5c6b255e805ec701ac974
parent396414e2c66957820b35e20f302b4f89aebf61d5 (diff)
Manual sync with EOM -- only release an SA if it's referenced by the
timeout routine (should there be a default expiration if none is negotiated ?)
-rw-r--r--sbin/isakmpd/exchange.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/isakmpd/exchange.c b/sbin/isakmpd/exchange.c
index 322b7257b22..faedb0b4176 100644
--- a/sbin/isakmpd/exchange.c
+++ b/sbin/isakmpd/exchange.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exchange.c,v 1.34 2000/10/16 23:27:33 niklas Exp $ */
+/* $OpenBSD: exchange.c,v 1.35 2000/12/02 02:08:17 angelos Exp $ */
/* $EOM: exchange.c,v 1.134 2000/10/16 18:16:58 provos Exp $ */
/*
@@ -1407,7 +1407,6 @@ exchange_finalize (struct message *msg)
}
}
-
/*
* There is no reason to keep the SAs connected to us anymore, in fact
* it can hurt us if we have short lifetimes on the SAs and we try
@@ -1424,7 +1423,8 @@ exchange_finalize (struct message *msg)
exchange->id_r_len);
TAILQ_REMOVE (&exchange->sa_list, sa, next);
- sa_release (sa);
+ if (sa->refcnt > 1)
+ sa_release (sa);
}
/* If we have nothing to retransmit we can safely remove ourselves. */