diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1999-02-26 03:37:57 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1999-02-26 03:37:57 +0000 |
commit | 345e3854b801bd6c4c983ac79ce52f4f79709e57 (patch) | |
tree | 90f772da62da2a2638cce2d4f32f247276dbf4a1 /sbin/isakmpd | |
parent | 7f93fcba37d979c71e4503907b8f1404ee510773 (diff) |
Merge from the Ericsson repository
| revision 1.64
| date: 1999/02/25 11:38:53; author: niklas; state: Exp; lines: +3 -1
| include sysdep.h everywhere
| ----------------------------
| revision 1.63
| date: 1999/02/25 11:09:33; author: niklas; state: Exp; lines: +3 -5
| Make conf_get_num take a default value to give back when tag does not exist
| ----------------------------
| revision 1.62
| date: 1999/02/06 14:57:51; author: niklas; state: Exp; lines: +3 -3
| Export exchange_lookup_by_name
| ----------------------------
| revision 1.61
| date: 1999/01/31 01:14:58; author: niklas; state: Exp; lines: +2 -2
| commentary
| ----------------------------
Diffstat (limited to 'sbin/isakmpd')
-rw-r--r-- | sbin/isakmpd/exchange.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sbin/isakmpd/exchange.c b/sbin/isakmpd/exchange.c index 8e37139b36f..2568ae54c6e 100644 --- a/sbin/isakmpd/exchange.c +++ b/sbin/isakmpd/exchange.c @@ -1,5 +1,5 @@ -/* $OpenBSD: exchange.c,v 1.7 1998/12/21 01:02:23 niklas Exp $ */ -/* $EOM: exchange.c,v 1.60 1998/12/21 00:34:12 niklas Exp $ */ +/* $OpenBSD: exchange.c,v 1.8 1999/02/26 03:37:56 niklas Exp $ */ +/* $EOM: exchange.c,v 1.64 1999/02/25 11:38:53 niklas Exp $ */ /* * Copyright (c) 1998 Niklas Hallqvist. All rights reserved. @@ -41,6 +41,8 @@ #include <stdlib.h> #include <string.h> +#include "sysdep.h" + #include "cert.h" #include "conf.h" #include "constants.h" @@ -428,8 +430,8 @@ exchange_lookup_from_icookie (u_int8_t *cookie) return 0; } -/* Lookup a phase 1 exchange out of the name. */ -static struct exchange * +/* Lookup an exchange out of the name and phase. */ +struct exchange * exchange_lookup_by_name (char *name, int phase) { int i; @@ -558,9 +560,7 @@ exchange_create (int phase, int initiator, int doi, int type) } gettimeofday(&expiration, 0); - delta = conf_get_num ("General", "Exchange-max-time"); - if (!delta) - delta = EXCHANGE_MAX_TIME; + delta = conf_get_num ("General", "Exchange-max-time", EXCHANGE_MAX_TIME); expiration.tv_sec += delta; exchange->death = timer_add_event ("exchange_free_aux", (void (*) (void *))exchange_free_aux, @@ -623,7 +623,7 @@ exchange_establish_p1 (struct transport *t, u_int8_t type, u_int32_t doi, #endif } - /* Figure out the DOI. */ + /* Figure out the DOI. XXX Factor out? */ str = conf_get_str (tag, "DOI"); if (!str) { @@ -1223,7 +1223,7 @@ exchange_establish (char *name, void (*finalize) (void *), void *arg) char *peer; struct sa *isakmp_sa; - phase = conf_get_num (name, "Phase"); + phase = conf_get_num (name, "Phase", 0); switch (phase) { case 1: |