diff options
author | tobhe <tobhe@cvs.openbsd.org> | 2019-11-13 12:24:41 +0000 |
---|---|---|
committer | tobhe <tobhe@cvs.openbsd.org> | 2019-11-13 12:24:41 +0000 |
commit | c61b33a3cd19f29118518ca1ecc96720152a5994 (patch) | |
tree | e3f88dd8f84f08a583c602234d31e1159577a9b5 /sbin/iked/ikev2_msg.c | |
parent | a8f3941f85245b87ff58aee5ad8b9c6d389f0a55 (diff) |
Log reason whenever a child SA is freed. This makes it easier to
distinguish "valid" reasons to close an SA, such as rekeying,
from errors.
ok sthen@
Diffstat (limited to 'sbin/iked/ikev2_msg.c')
-rw-r--r-- | sbin/iked/ikev2_msg.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/iked/ikev2_msg.c b/sbin/iked/ikev2_msg.c index d1ee03ac29e..d8e005eeb11 100644 --- a/sbin/iked/ikev2_msg.c +++ b/sbin/iked/ikev2_msg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ikev2_msg.c,v 1.57 2019/11/11 15:10:39 tobhe Exp $ */ +/* $OpenBSD: ikev2_msg.c,v 1.58 2019/11/13 12:24:40 tobhe Exp $ */ /* * Copyright (c) 2019 Tobias Heider <tobias.heider@stusta.de> @@ -1214,6 +1214,7 @@ ikev2_msg_retransmit_timeout(struct iked *env, void *arg) (struct sockaddr *)&msg->msg_local, msg->msg_locallen) == -1) { log_warn("%s: sendtofrom", __func__); + ikev2_ike_sa_setreason(sa, "retransmit failed"); sa_free(env, sa); return; } @@ -1223,6 +1224,7 @@ ikev2_msg_retransmit_timeout(struct iked *env, void *arg) } else { log_debug("%s: retransmit limit reached for msgid %u", __func__, msg->msg_msgid); + ikev2_ike_sa_setreason(sa, "retransmit limit reached"); sa_free(env, sa); } } |