summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHakan Olsson <ho@cvs.openbsd.org>2002-06-07 04:56:14 +0000
committerHakan Olsson <ho@cvs.openbsd.org>2002-06-07 04:56:14 +0000
commit7ee306b6bcf1d8762416392a01a440aa8c210081 (patch)
treed0b4d0c220d3401c41d1a22c464b24fcf90c1f0a
parent18836590b1d6422364c515e69c6ac806131b6cea (diff)
This should solve PR#2729.
-rw-r--r--sbin/isakmpd/ipsec.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/sbin/isakmpd/ipsec.c b/sbin/isakmpd/ipsec.c
index 13cc462b22f..d539f1cff9f 100644
--- a/sbin/isakmpd/ipsec.c
+++ b/sbin/isakmpd/ipsec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ipsec.c,v 1.65 2002/06/01 07:44:21 deraadt Exp $ */
+/* $OpenBSD: ipsec.c,v 1.66 2002/06/07 04:56:13 ho Exp $ */
/* $EOM: ipsec.c,v 1.143 2000/12/11 23:57:42 niklas Exp $ */
/*
@@ -325,22 +325,6 @@ ipsec_finalize_exchange (struct message *msg)
for (sa = TAILQ_FIRST (&exchange->sa_list); sa;
sa = TAILQ_NEXT (sa, next))
{
- for (proto = TAILQ_FIRST (&sa->protos), last_proto = 0; proto;
- proto = TAILQ_NEXT (proto, link))
- {
- if (sysdep_ipsec_set_spi (sa, proto, 0, isakmp_sa)
- || (last_proto
- && sysdep_ipsec_group_spis (sa, last_proto, proto,
- 0))
- || sysdep_ipsec_set_spi (sa, proto, 1, isakmp_sa)
- || (last_proto
- && sysdep_ipsec_group_spis (sa, last_proto, proto,
- 1)))
- /* XXX Tear down this exchange. */
- return;
- last_proto = proto;
- }
-
isa = sa->data;
if (exchange->initiator)
@@ -364,6 +348,22 @@ ipsec_finalize_exchange (struct message *msg)
}
}
+ for (proto = TAILQ_FIRST (&sa->protos), last_proto = 0; proto;
+ proto = TAILQ_NEXT (proto, link))
+ {
+ if (sysdep_ipsec_set_spi (sa, proto, 0, isakmp_sa)
+ || (last_proto
+ && sysdep_ipsec_group_spis (sa, last_proto, proto,
+ 0))
+ || sysdep_ipsec_set_spi (sa, proto, 1, isakmp_sa)
+ || (last_proto
+ && sysdep_ipsec_group_spis (sa, last_proto, proto,
+ 1)))
+ /* XXX Tear down this exchange. */
+ return;
+ last_proto = proto;
+ }
+
#ifdef USE_DEBUG
if (sockaddr2text (isa->src_net, &addr1, 0))
addr1 = 0;