summaryrefslogtreecommitdiff
path: root/sbin/iked
diff options
context:
space:
mode:
authortobhe <tobhe@cvs.openbsd.org>2020-04-17 20:54:24 +0000
committertobhe <tobhe@cvs.openbsd.org>2020-04-17 20:54:24 +0000
commit4da39094bcc64b98c7e5bdb51fc4c9e57d3cca8d (patch)
tree0db1c20bbc7766dbadff2a0f21a65c5d7b2b0a84 /sbin/iked
parentc3665edeabc2f5fc4af55c01d246171df02646ba (diff)
Log retransmits of sent requests and responses.
ok markus@
Diffstat (limited to 'sbin/iked')
-rw-r--r--sbin/iked/ikev2_msg.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/sbin/iked/ikev2_msg.c b/sbin/iked/ikev2_msg.c
index 3a3d17c36f7..3e651f3db7a 100644
--- a/sbin/iked/ikev2_msg.c
+++ b/sbin/iked/ikev2_msg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ikev2_msg.c,v 1.64 2020/03/10 09:42:40 tobhe Exp $ */
+/* $OpenBSD: ikev2_msg.c,v 1.65 2020/04/17 20:54:23 tobhe Exp $ */
/*
* Copyright (c) 2019 Tobias Heider <tobias.heider@stusta.de>
@@ -1130,6 +1130,12 @@ ikev2_msg_retransmit_response(struct iked *env, struct iked_sa *sa,
log_warn("%s: sendtofrom", __func__);
return (-1);
}
+ log_info("%sretransmit %s res %u local %s peer %s",
+ SPI_SA(sa, NULL),
+ print_map(msg->msg_exchange, ikev2_exchange_map),
+ msg->msg_msgid,
+ print_host((struct sockaddr *)&msg->msg_local, NULL, 0),
+ print_host((struct sockaddr *)&msg->msg_peer, NULL, 0));
timer_add(env, &msg->msg_timer, IKED_RESPONSE_TIMEOUT);
return (0);
@@ -1164,8 +1170,15 @@ ikev2_msg_retransmit_timeout(struct iked *env, void *arg)
/* Exponential timeout */
timer_add(env, &msg->msg_timer,
IKED_RETRANSMIT_TIMEOUT * (2 << (msg->msg_tries++)));
+ log_info("%sretransmit %d %s req %u peer %s local %s",
+ SPI_SA(sa, NULL),
+ msg->msg_tries,
+ print_map(msg->msg_exchange, ikev2_exchange_map),
+ msg->msg_msgid,
+ print_host((struct sockaddr *)&msg->msg_peer, NULL, 0),
+ print_host((struct sockaddr *)&msg->msg_local, NULL, 0));
} else {
- log_debug("%s: retransmit limit reached for msgid %u",
+ log_debug("%s: retransmit limit reached for req %u",
__func__, msg->msg_msgid);
ikev2_ike_sa_setreason(sa, "retransmit limit reached");
sa_free(env, sa);