diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 2000-10-09 23:27:12 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 2000-10-09 23:27:12 +0000 |
commit | bc95c273aef5629e3028841e49878206312c31fe (patch) | |
tree | 77d743902caf9ed0559e575ffd81039e782c8053 /sbin/isakmpd | |
parent | 81e057add4192afbc15f624f83c42062d435661f (diff) |
Merge with EOM 1.133
author: angelos
Use Default entry for Phase 1 configuration if none is found.
Diffstat (limited to 'sbin/isakmpd')
-rw-r--r-- | sbin/isakmpd/exchange.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sbin/isakmpd/exchange.c b/sbin/isakmpd/exchange.c index 5a2edd7b305..776c760f32e 100644 --- a/sbin/isakmpd/exchange.c +++ b/sbin/isakmpd/exchange.c @@ -1,5 +1,5 @@ -/* $OpenBSD: exchange.c,v 1.32 2000/10/07 06:57:43 niklas Exp $ */ -/* $EOM: exchange.c,v 1.132 2000/10/06 23:36:11 niklas Exp $ */ +/* $OpenBSD: exchange.c,v 1.33 2000/10/09 23:27:11 niklas Exp $ */ +/* $EOM: exchange.c,v 1.133 2000/10/09 02:54:34 angelos Exp $ */ /* * Copyright (c) 1998, 1999, 2000 Niklas Hallqvist. All rights reserved. @@ -725,8 +725,7 @@ exchange_establish_p1 (struct transport *t, u_int8_t type, u_int32_t doi, tag = conf_get_str (name, "Configuration"); if (!tag) { - /* XXX I am not sure a default should be used. */ -#if 0 + /* Use default setting */ tag = conf_get_str ("Phase 1", "Default"); if (!tag) { @@ -734,7 +733,7 @@ exchange_establish_p1 (struct transport *t, u_int8_t type, u_int32_t doi, "no \"Default\" tag in [Phase 1] section"); return; } -#else +#if 0 log_print ("exchange_establish_p1: " "no configuration found for peer \"%s\"", name); @@ -788,7 +787,11 @@ exchange_establish_p1 (struct transport *t, u_int8_t type, u_int32_t doi, return; } } + exchange->policy = name ? conf_get_str (name, "Configuration") : 0; + if ((exchange->policy == NULL) && name) + exchange->policy = conf_get_str ("Phase 1", "Default"); + exchange->finalize = finalize; exchange->finalize_arg = arg; cookie_gen (t, exchange, exchange->cookies, ISAKMP_HDR_ICOOKIE_LEN); |