summaryrefslogtreecommitdiff
path: root/sbin/iked
diff options
context:
space:
mode:
authorMike Belopuhov <mikeb@cvs.openbsd.org>2010-12-21 13:24:12 +0000
committerMike Belopuhov <mikeb@cvs.openbsd.org>2010-12-21 13:24:12 +0000
commit5cded6af93cfd8b8b260495dd5c704e7452eac4a (patch)
tree1be96abbf236f869c6d48fe87fb7b7c71f5e0f25 /sbin/iked
parenta2ab977bb40bc3251e07e1b99eab3082ce922d4e (diff)
fixup log_warn and log_debug arguments; ok reyk
Diffstat (limited to 'sbin/iked')
-rw-r--r--sbin/iked/control.c6
-rw-r--r--sbin/iked/crypto.c16
-rw-r--r--sbin/iked/eap.c18
3 files changed, 22 insertions, 18 deletions
diff --git a/sbin/iked/control.c b/sbin/iked/control.c
index 4a138d4245e..79c94d2a302 100644
--- a/sbin/iked/control.c
+++ b/sbin/iked/control.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: control.c,v 1.3 2010/06/24 20:15:30 reyk Exp $ */
+/* $OpenBSD: control.c,v 1.4 2010/12/21 13:24:11 mikeb Exp $ */
/* $vantronix: control.c,v 1.4 2010/05/14 07:35:52 reyk Exp $ */
/*
@@ -117,7 +117,7 @@ control_listen(struct control_sock *cs)
return (0);
if (listen(cs->cs_fd, CONTROL_BACKLOG) == -1) {
- log_warn("%s: listen");
+ log_warn("%s: listen", __func__);
return (-1);
}
@@ -150,7 +150,7 @@ control_accept(int listenfd, short event, void *arg)
if ((connfd = accept(listenfd,
(struct sockaddr *)&sun, &len)) == -1) {
if (errno != EWOULDBLOCK && errno != EINTR)
- log_warn("%s: accept");
+ log_warn("%s: accept", __func__);
return;
}
diff --git a/sbin/iked/crypto.c b/sbin/iked/crypto.c
index 0644f793cef..fc5b0d42e4c 100644
--- a/sbin/iked/crypto.c
+++ b/sbin/iked/crypto.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: crypto.c,v 1.4 2010/11/08 12:16:20 mikeb Exp $ */
+/* $OpenBSD: crypto.c,v 1.5 2010/12/21 13:24:11 mikeb Exp $ */
/* $vantronix: crypto.c,v 1.18 2010/05/28 15:34:35 reyk Exp $ */
/*
@@ -77,7 +77,7 @@ hash_new(u_int8_t type, u_int16_t id)
case IKEV2_XFORMPRF_HMAC_TIGER:
case IKEV2_XFORMPRF_AES128_CMAC:
default:
- log_debug("%s: prf %s not supported",
+ log_debug("%s: prf %s not supported", __func__,
print_map(id, ikev2_xformprf_map));
break;
}
@@ -120,13 +120,13 @@ hash_new(u_int8_t type, u_int16_t id)
case IKEV2_XFORMAUTH_AES_192_GMAC:
case IKEV2_XFORMAUTH_AES_256_GMAC:
default:
- log_debug("%s: auth %s not supported",
+ log_debug("%s: auth %s not supported", __func__,
print_map(id, ikev2_xformauth_map));
break;
}
break;
default:
- log_debug("%s: hash type %s not supported",
+ log_debug("%s: hash type %s not supported", __func__,
print_map(id, ikev2_xformtype_map));
break;
}
@@ -274,14 +274,14 @@ cipher_new(u_int8_t type, u_int16_t id, u_int16_t id_length)
case IKEV2_XFORMENCR_AES_CTR:
/* FALLTHROUGH */
default:
- log_debug("%s: cipher %s not supported",
+ log_debug("%s: cipher %s not supported", __func__,
print_map(id, ikev2_xformencr_map));
cipher = NULL;
break;
}
break;
default:
- log_debug("%s: cipher type %s not supported",
+ log_debug("%s: cipher type %s not supported", __func__,
print_map(id, ikev2_xformtype_map));
break;
}
@@ -329,7 +329,7 @@ cipher_setiv(struct iked_cipher *encr, void *iv, size_t len)
ibuf_release(encr->encr_iv);
if (iv != NULL) {
if (len < encr->encr_ivlength) {
- log_debug("%s: invalid IV length %d", len);
+ log_debug("%s: invalid IV length %d", __func__, len);
return (NULL);
}
encr->encr_iv = ibuf_new(iv, encr->encr_ivlength);
@@ -472,7 +472,7 @@ dsa_new(u_int16_t id, struct iked_hash *prf, int sign)
dsa.dsa_priv = EVP_sha512();
break;
default:
- log_debug("%s: auth method %s not supported",
+ log_debug("%s: auth method %s not supported", __func__,
print_map(id, ikev2_auth_map));
break;
}
diff --git a/sbin/iked/eap.c b/sbin/iked/eap.c
index 2aadb1af83f..144aef8a16c 100644
--- a/sbin/iked/eap.c
+++ b/sbin/iked/eap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: eap.c,v 1.3 2010/10/14 19:35:02 dhill Exp $ */
+/* $OpenBSD: eap.c,v 1.4 2010/12/21 13:24:11 mikeb Exp $ */
/* $vantronix: eap.c,v 1.12 2010/05/31 11:30:08 reyk Exp $ */
/*
@@ -227,7 +227,7 @@ eap_mschap(struct iked *env, struct iked_sa *sa, struct eap_message *eap)
else
name = get_string(ptr, len);
if (name == NULL) {
- log_debug("%s: invalid response name");
+ log_debug("%s: invalid response name", __func__);
return (-1);
}
if ((usr = user_lookup(env, name)) == NULL) {
@@ -395,7 +395,8 @@ eap_parse(struct iked *env, struct iked_sa *sa, void *data, int response)
len = betoh16(eap->eap_length) -
sizeof(*eap) - sizeof(*msc);
if ((str = get_string(ptr, len)) == NULL) {
- log_debug("%s: invalid challenge name");
+ log_debug("%s: invalid challenge name",
+ __func__);
return (-1);
}
log_info("%s: %s %s id %d "
@@ -415,7 +416,8 @@ eap_parse(struct iked *env, struct iked_sa *sa, void *data, int response)
len = betoh16(eap->eap_length) -
sizeof(*eap) - sizeof(*msr);
if ((str = get_string(ptr, len)) == NULL) {
- log_debug("%s: invalid response name");
+ log_debug("%s: invalid response name",
+ __func__);
return (-1);
}
log_info("%s: %s %s id %d "
@@ -436,7 +438,8 @@ eap_parse(struct iked *env, struct iked_sa *sa, void *data, int response)
len = betoh16(eap->eap_length) -
sizeof(*eap) - sizeof(*mss);
if ((str = get_string(ptr, len)) == NULL) {
- log_debug("%s: invalid response name");
+ log_debug("%s: invalid response name",
+ __func__);
return (-1);
}
log_info("%s: %s %s request id %d "
@@ -457,7 +460,7 @@ eap_parse(struct iked *env, struct iked_sa *sa, void *data, int response)
if (!sa_stateok(sa, IKEV2_STATE_AUTH_SUCCESS))
return (-1);
- return (eap_success(env, sa, hdr));
+ return (eap_success(env, sa, hdr));
}
break;
case EAP_MSOPCODE_FAILURE:
@@ -466,7 +469,8 @@ eap_parse(struct iked *env, struct iked_sa *sa, void *data, int response)
len = betoh16(eap->eap_length) -
sizeof(*eap) - sizeof(*msf);
if ((str = get_string(ptr, len)) == NULL) {
- log_debug("%s: invalid failure message");
+ log_debug("%s: invalid failure message",
+ __func__);
return (-1);
}
log_info("%s: %s %s id %d "