diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1999-02-26 03:42:31 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1999-02-26 03:42:31 +0000 |
commit | 0e4212a5d63f1c8121acb13d058584f793e50889 (patch) | |
tree | ec255fa554c54030a89cdd33b8d9ebbf85651b4b /sbin | |
parent | 57b0583d7505f4234a0172e3147b5bad16f421b7 (diff) |
Merge from the Ericsson repository
| revision 1.69
| date: 1999/02/25 11:39:04; author: niklas; state: Exp; lines: +3 -1
| include sysdep.h everywhere
| ----------------------------
| revision 1.68
| date: 1999/02/25 11:09:36; author: niklas; state: Exp; lines: +7 -6
| Make conf_get_num take a default value to give back when tag does not exist
| ----------------------------
| revision 1.67
| date: 1999/02/25 10:21:30; author: niklas; state: Exp; lines: +2 -2
| Replay window changes was done at the wrong level
| ----------------------------
| revision 1.66
| date: 1999/02/25 09:30:23; author: niklas; state: Exp; lines: +5 -1
| Replay protection window configurable
| ----------------------------
| revision 1.65
| date: 1999/02/14 00:07:24; author: niklas; state: Exp; lines: +4 -3
| Clarify which SPI we are setting up
| ----------------------------
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/isakmpd/ike_quick_mode.c | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/sbin/isakmpd/ike_quick_mode.c b/sbin/isakmpd/ike_quick_mode.c index b5e5340aab8..c1e9804e747 100644 --- a/sbin/isakmpd/ike_quick_mode.c +++ b/sbin/isakmpd/ike_quick_mode.c @@ -1,5 +1,5 @@ -/* $OpenBSD: ike_quick_mode.c,v 1.5 1998/12/21 01:02:24 niklas Exp $ */ -/* $EOM: ike_quick_mode.c,v 1.64 1998/12/17 07:55:46 niklas Exp $ */ +/* $OpenBSD: ike_quick_mode.c,v 1.6 1999/02/26 03:42:30 niklas Exp $ */ +/* $EOM: ike_quick_mode.c,v 1.69 1999/02/25 11:39:04 niklas Exp $ */ /* * Copyright (c) 1998 Niklas Hallqvist. All rights reserved. @@ -37,6 +37,8 @@ #include <stdlib.h> #include <string.h> +#include "sysdep.h" + #include "attribute.h" #include "conf.h" #include "dh.h" @@ -240,7 +242,7 @@ initiator_send_HASH_SA_NONCE (struct message *msg) IPSEC_ATTR_SA_LIFE_TYPE, &attr); /* XXX Does only handle 16-bit entities! */ - value = conf_get_num (life->field, "LIFE_DURATION"); + value = conf_get_num (life->field, "LIFE_DURATION", 0); if (value) attr = attribute_set_basic (attr, @@ -262,24 +264,25 @@ initiator_send_HASH_SA_NONCE (struct message *msg) ike_group_desc_cst, IPSEC_ATTR_GROUP_DESCRIPTION, &attr); - value = conf_get_num (xf->field, "KEY_LENGTH"); + value = conf_get_num (xf->field, "KEY_LENGTH", 0); if (value) attr = attribute_set_basic (attr, IPSEC_ATTR_KEY_LENGTH, value); - value = conf_get_num (xf->field, "KEY_ROUNDS"); + value = conf_get_num (xf->field, "KEY_ROUNDS", 0); if (value) attr = attribute_set_basic (attr, IPSEC_ATTR_KEY_ROUNDS, value); - value = conf_get_num (xf->field, "COMPRESS_DICTIONARY_SIZE"); + value = conf_get_num (xf->field, "COMPRESS_DICTIONARY_SIZE", 0); if (value) attr = attribute_set_basic (attr, IPSEC_ATTR_COMPRESS_DICTIONARY_SIZE, value); - value = conf_get_num (xf->field, "COMPRESS_PRIVATE_ALGORITHM"); + value + = conf_get_num (xf->field, "COMPRESS_PRIVATE_ALGORITHM", 0); if (value) attr = attribute_set_basic (attr, @@ -324,10 +327,15 @@ initiator_send_HASH_SA_NONCE (struct message *msg) TAILQ_INSERT_TAIL (&TAILQ_FIRST (&exchange->sa_list)->protos, proto, link); + /* Setup the incoming SPI. */ SET_ISAKMP_PROP_SPI_SZ (proposal[prop_no], spi_sz); memcpy (proposal[prop_no] + ISAKMP_PROP_SPI_OFF, spi, spi_sz); - proto->spi_sz[exchange->initiator] = spi_sz; - proto->spi[exchange->initiator] = spi; + proto->spi_sz[1] = spi_sz; + proto->spi[1] = spi; + + /* Let the DOI get at proto for initializing its own data. */ + if (doi->proto_init) + doi->proto_init (proto, prot->field); SET_ISAKMP_PROP_NTRANSFORMS (proposal[prop_no], transform_cnt[prop_no]); |