summaryrefslogtreecommitdiff
path: root/sbin/isakmpd/sa.c
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-06-07 03:20:22 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-06-07 03:20:22 +0000
commit99d1a909ebc8a2090e2906cdeca5064904577a18 (patch)
treecaa9d67dafb3c72b8386026d038a241e56c3e3f5 /sbin/isakmpd/sa.c
parent5b454dc91cd79f44b2c3754a5f9d334d3ca099da (diff)
Correctly initialize the policy_id field on SA structures, such that
failed SAs don't cause the default policy context to be free'ed (and thus cause no end of trouble in establishing further Phase 1 SAs)
Diffstat (limited to 'sbin/isakmpd/sa.c')
-rw-r--r--sbin/isakmpd/sa.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/isakmpd/sa.c b/sbin/isakmpd/sa.c
index f8e43ededf4..eff8ddaa113 100644
--- a/sbin/isakmpd/sa.c
+++ b/sbin/isakmpd/sa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sa.c,v 1.42 2001/05/31 20:25:37 angelos Exp $ */
+/* $OpenBSD: sa.c,v 1.43 2001/06/07 03:20:21 angelos Exp $ */
/* $EOM: sa.c,v 1.112 2000/12/12 00:22:52 niklas Exp $ */
/*
@@ -376,6 +376,7 @@ sa_create (struct exchange *exchange, struct transport *t)
memcpy (sa->cookies, exchange->cookies, ISAKMP_HDR_COOKIES_LEN);
memcpy (sa->message_id, exchange->message_id, ISAKMP_HDR_MESSAGE_ID_LEN);
sa->doi = exchange->doi;
+ sa->policy_id = -1;
if (sa->doi->sa_size)
{