summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1999-03-24 14:41:18 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1999-03-24 14:41:18 +0000
commitbdaca4afe7a2d8c87125b7d6670ce0016e84ce2e (patch)
treed7907cf58ccdaf8e0bf0d291fec4e5a5d3656a16
parente866749e557c28dbd66d957564063045cd81dc9a (diff)
Merge with EOM 1.68
Stash SPIs in the right slots
-rw-r--r--sbin/isakmpd/sa.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/sbin/isakmpd/sa.c b/sbin/isakmpd/sa.c
index 7a0dfa70f9a..6c5199447bf 100644
--- a/sbin/isakmpd/sa.c
+++ b/sbin/isakmpd/sa.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: sa.c,v 1.8 1999/03/02 15:48:23 niklas Exp $ */
-/* $EOM: sa.c,v 1.67 1999/03/02 15:42:57 niklas Exp $ */
+/* $OpenBSD: sa.c,v 1.9 1999/03/24 14:41:17 niklas Exp $ */
+/* $EOM: sa.c,v 1.68 1999/03/24 11:04:55 niklas Exp $ */
/*
* Copyright (c) 1998 Niklas Hallqvist. All rights reserved.
@@ -427,14 +427,13 @@ sa_add_transform (struct sa *sa, struct payload *xf, int initiator,
proto->no = GET_ISAKMP_PROP_NO (prop->p);
proto->proto = GET_ISAKMP_PROP_PROTO (prop->p);
- proto->spi_sz[!initiator] = GET_ISAKMP_PROP_SPI_SZ (prop->p);
- if (proto->spi_sz[!initiator])
+ proto->spi_sz[0] = GET_ISAKMP_PROP_SPI_SZ (prop->p);
+ if (proto->spi_sz[0])
{
- proto->spi[!initiator] = malloc (proto->spi_sz[!initiator]);
- if (!proto->spi[!initiator])
+ proto->spi[0] = malloc (proto->spi_sz[0]);
+ if (!proto->spi[0])
goto cleanup;
- memcpy (proto->spi[!initiator], prop->p + ISAKMP_PROP_SPI_OFF,
- proto->spi_sz[!initiator]);
+ memcpy (proto->spi[0], prop->p + ISAKMP_PROP_SPI_OFF, proto->spi_sz[0]);
}
proto->chosen = xf;
proto->sa = sa;