summaryrefslogtreecommitdiff
path: root/sbin/isakmpd
diff options
context:
space:
mode:
authorHakan Olsson <ho@cvs.openbsd.org>2004-08-23 11:53:25 +0000
committerHakan Olsson <ho@cvs.openbsd.org>2004-08-23 11:53:25 +0000
commit16b13f1c5161dc4e740cf2ff1620dd1f58ef321c (patch)
tree4be6305a6093cd285b906ca2156436202cadf6b8 /sbin/isakmpd
parent5c480e7243b62b45ee1c97baf53b3ccce89dc6ba (diff)
We need to set sa->initiator before checking if the newly created SA
replaces an old one, or the id_i/id_r check will mismatch. Previous behaviour was mostly harmless, but wasted some resources (until normal SA expiration). hshoexer@ "haven't tried, but think it's ok"
Diffstat (limited to 'sbin/isakmpd')
-rw-r--r--sbin/isakmpd/exchange.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/isakmpd/exchange.c b/sbin/isakmpd/exchange.c
index 2deec9cc793..bf698eb5e95 100644
--- a/sbin/isakmpd/exchange.c
+++ b/sbin/isakmpd/exchange.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exchange.c,v 1.102 2004/08/10 15:59:10 ho Exp $ */
+/* $OpenBSD: exchange.c,v 1.103 2004/08/23 11:53:24 ho Exp $ */
/* $EOM: exchange.c,v 1.143 2000/12/04 00:02:25 angelos Exp $ */
/*
@@ -1399,6 +1399,7 @@ exchange_finalize(struct message *msg)
* Locate any old SAs and mark them replaced
* (SA_FLAG_REPLACED).
*/
+ sa->initiator = exchange->initiator;
while ((old_sa = sa_find(exchange_check_old_sa, sa)) != 0)
sa_mark_replaced(old_sa);