summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1999-02-26 03:41:47 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1999-02-26 03:41:47 +0000
commit57b0583d7505f4234a0172e3147b5bad16f421b7 (patch)
treea91c0d061afa32dc50328b67bbd6976bc837b974
parent4960777406f5b7c781bc82e05c8a54c665ae1f5c (diff)
Merge from the Ericsson repository
| revision 1.70 | date: 1999/02/25 11:39:03; author: niklas; state: Exp; lines: +3 -1 | include sysdep.h everywhere | ---------------------------- | revision 1.69 | date: 1999/02/25 11:09:35; author: niklas; state: Exp; lines: +5 -5 | Make conf_get_num take a default value to give back when tag does not exist | ----------------------------
-rw-r--r--sbin/isakmpd/ike_main_mode.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/sbin/isakmpd/ike_main_mode.c b/sbin/isakmpd/ike_main_mode.c
index 7b7ee7eeff4..820334acf21 100644
--- a/sbin/isakmpd/ike_main_mode.c
+++ b/sbin/isakmpd/ike_main_mode.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: ike_main_mode.c,v 1.5 1998/12/21 01:02:24 niklas Exp $ */
-/* $EOM: ike_main_mode.c,v 1.68 1998/12/17 07:54:20 niklas Exp $ */
+/* $OpenBSD: ike_main_mode.c,v 1.6 1999/02/26 03:41:46 niklas Exp $ */
+/* $EOM: ike_main_mode.c,v 1.70 1999/02/25 11:39:03 niklas Exp $ */
/*
* Copyright (c) 1998 Niklas Hallqvist. All rights reserved.
@@ -39,6 +39,8 @@
#include <stdlib.h>
#include <string.h>
+#include "sysdep.h"
+
#include "attribute.h"
#include "conf.h"
#include "constants.h"
@@ -204,7 +206,7 @@ initiator_send_SA (struct message *msg)
&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, IKE_ATTR_LIFE_DURATION, value);
@@ -214,15 +216,15 @@ initiator_send_SA (struct message *msg)
attribute_set_constant (xf->field, "PRF", ike_prf_cst, IKE_ATTR_PRF,
&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, IKE_ATTR_KEY_LENGTH, value);
- value = conf_get_num (xf->field, "FIELD_SIZE");
+ value = conf_get_num (xf->field, "FIELD_SIZE", 0);
if (value)
attr = attribute_set_basic (attr, IKE_ATTR_FIELD_SIZE, value);
- value = conf_get_num (xf->field, "GROUP_ORDER");
+ value = conf_get_num (xf->field, "GROUP_ORDER", 0);
if (value)
attr = attribute_set_basic (attr, IKE_ATTR_GROUP_ORDER, value);