summaryrefslogtreecommitdiff
path: root/sys/netinet/ip_ipsp.c
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-06-05 09:21:39 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-06-05 09:21:39 +0000
commita7348702b223b3ec4b6363440580e755ccf7859d (patch)
tree51d2404e389fd110c96fa87a61e1515df323fdbf /sys/netinet/ip_ipsp.c
parentf654597827b2690c82bd5d003df8ae1c8e32e658 (diff)
Clear acquires only if TDB was established correctly.
Diffstat (limited to 'sys/netinet/ip_ipsp.c')
-rw-r--r--sys/netinet/ip_ipsp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netinet/ip_ipsp.c b/sys/netinet/ip_ipsp.c
index c5263535407..5b0ea55afff 100644
--- a/sys/netinet/ip_ipsp.c
+++ b/sys/netinet/ip_ipsp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ipsp.c,v 1.126 2001/06/05 06:38:07 angelos Exp $ */
+/* $OpenBSD: ip_ipsp.c,v 1.127 2001/06/05 09:21:38 angelos Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
@@ -899,7 +899,8 @@ tdb_init(struct tdb *tdbp, u_int16_t alg, struct ipsecinit *ii)
err = (*(xsp->xf_init))(tdbp, xsp, ii);
/* Clear possible pending acquires */
- ipsp_clear_acquire(tdbp);
+ if (!err)
+ ipsp_clear_acquire(tdbp);
return err;
}