From a7348702b223b3ec4b6363440580e755ccf7859d Mon Sep 17 00:00:00 2001 From: "Angelos D. Keromytis" Date: Tue, 5 Jun 2001 09:21:39 +0000 Subject: Clear acquires only if TDB was established correctly. --- sys/netinet/ip_ipsp.c | 5 +++-- 1 file 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; } -- cgit v1.2.3