summaryrefslogtreecommitdiff
path: root/sbin/isakmpd/isakmp_doi.c
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>2000-02-25 17:23:43 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>2000-02-25 17:23:43 +0000
commit21910ef24718f8005826a8363b6fa6aea6cca145 (patch)
tree54ded622fa65f31f93fbcbd04d876345c6a13682 /sbin/isakmpd/isakmp_doi.c
parent47167191f09ba0d3c55764f63f6be1d9bcb1aa4b (diff)
regress/crypto/Makefile: Merge with EOM 1.5
regress/dh/Makefile: Merge with EOM 1.7 regress/group/Makefile: Merge with EOM 1.9 regress/prf/Makefile: Merge with EOM 1.4 regress/rsakeygen/Makefile: Merge with EOM 1.8 regress/x509/Makefile: Merge with EOM 1.10 Makefile: Merge with EOM 1.62 attribute.c: Merge with EOM 1.10 sa.c: Merge with EOM 1.99 conf.c: Merge with EOM 1.20 crypto.c: Merge with EOM 1.28 isakmpd.c: Merge with EOM 1.45 connection.c: Merge with EOM 1.19 doi.h: Merge with EOM 1.28 field.c: Merge with EOM 1.11 exchange.c: Merge with EOM 1.116 ike_auth.c: Merge with EOM 1.44 pf_key_v2.c: Merge with EOM 1.37 ike_phase_1.c: Merge with EOM 1.22 ipsec.c: Merge with EOM 1.118 isakmp_doi.c: Merge with EOM 1.40 log.c: Merge with EOM 1.26 log.h: Merge with EOM 1.18 math_group.c: Merge with EOM 1.23 message.c: Merge with EOM 1.144 pf_encap.c: Merge with EOM 1.70 policy.c: Merge with EOM 1.18 timer.c: Merge with EOM 1.13 transport.c: Merge with EOM 1.41 udp.c: Merge with EOM 1.47 ui.c: Merge with EOM 1.37 x509.c: Merge with EOM 1.36 author: niklas Made debug logging a compile time selectable feature
Diffstat (limited to 'sbin/isakmpd/isakmp_doi.c')
-rw-r--r--sbin/isakmpd/isakmp_doi.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/sbin/isakmpd/isakmp_doi.c b/sbin/isakmpd/isakmp_doi.c
index b50df21b1e3..de9f506e5aa 100644
--- a/sbin/isakmpd/isakmp_doi.c
+++ b/sbin/isakmpd/isakmp_doi.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: isakmp_doi.c,v 1.8 1999/05/02 19:20:33 niklas Exp $ */
-/* $EOM: isakmp_doi.c,v 1.39 1999/05/02 12:49:01 niklas Exp $ */
+/* $OpenBSD: isakmp_doi.c,v 1.9 2000/02/25 17:23:40 niklas Exp $ */
+/* $EOM: isakmp_doi.c,v 1.40 2000/02/20 19:58:39 niklas Exp $ */
/*
* Copyright (c) 1998, 1999 Niklas Hallqvist. All rights reserved.
@@ -52,7 +52,9 @@
#include "sa.h"
#include "util.h"
+#ifdef USE_DEBUG
static int isakmp_debug_attribute (u_int16_t, u_int8_t *, u_int16_t, void *);
+#endif
static void isakmp_finalize_exchange (struct message *);
static struct keystate *isakmp_get_keystate (struct message *);
static int isakmp_initiator (struct message *);
@@ -73,7 +75,9 @@ static int isakmp_validate_transform_id (u_int8_t, u_int8_t);
static struct doi isakmp_doi = {
{ 0 }, ISAKMP_DOI_ISAKMP, 0, 0, 0,
+#ifdef USE_DEBUG
isakmp_debug_attribute,
+#endif
0, /* delete_spi not needed. */
0, /* exchange_script not needed. */
isakmp_finalize_exchange,
@@ -109,6 +113,7 @@ isakmp_doi_init ()
doi_register (&isakmp_doi);
}
+#ifdef USE_DEBUG
int
isakmp_debug_attribute (u_int16_t type, u_int8_t *value, u_int16_t len,
void *vmsg)
@@ -116,6 +121,7 @@ isakmp_debug_attribute (u_int16_t type, u_int8_t *value, u_int16_t len,
/* XXX Not implemented yet. */
return 0;
}
+#endif /* USE_DEBUG */
static void
isakmp_finalize_exchange (struct message *msg)
@@ -229,18 +235,18 @@ isakmp_responder (struct message *msg)
for (p = TAILQ_FIRST (&msg->payload[ISAKMP_PAYLOAD_NOTIFY]); p;
p = TAILQ_NEXT (p, link))
{
- log_debug (LOG_EXCHANGE, 10,
- "isakmp_responder: got NOTIFY of type %s, ignoring",
- constant_lookup (isakmp_notify_cst,
- GET_ISAKMP_NOTIFY_MSG_TYPE (p->p)));
+ LOG_DBG ((LOG_EXCHANGE, 10,
+ "isakmp_responder: got NOTIFY of type %s, ignoring",
+ constant_lookup (isakmp_notify_cst,
+ GET_ISAKMP_NOTIFY_MSG_TYPE (p->p))));
p->flags |= PL_MARK;
}
for (p = TAILQ_FIRST (&msg->payload[ISAKMP_PAYLOAD_DELETE]); p;
p = TAILQ_NEXT (p, link))
{
- log_debug (LOG_EXCHANGE, 10,
- "isakmp_responder: got DELETE, ignoring");
+ LOG_DBG ((LOG_EXCHANGE, 10,
+ "isakmp_responder: got DELETE, ignoring"));
p->flags |= PL_MARK;
}
return 0;