summaryrefslogtreecommitdiff
path: root/sbin/iked/pfkey.c
diff options
context:
space:
mode:
authortobhe <tobhe@cvs.openbsd.org>2020-12-04 16:18:15 +0000
committertobhe <tobhe@cvs.openbsd.org>2020-12-04 16:18:15 +0000
commit237a1010b39e77bb02a714c630f0d831e707a605 (patch)
treeb91f815f101453353a36b020a1be8ab6cd2199ae /sbin/iked/pfkey.c
parentdb7c354aa10d1fda8deed617715a9c36db5f37df (diff)
Log pfkey type and message length on write failure.
Diffstat (limited to 'sbin/iked/pfkey.c')
-rw-r--r--sbin/iked/pfkey.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sbin/iked/pfkey.c b/sbin/iked/pfkey.c
index cbe6b4ffeea..8f97419c9e2 100644
--- a/sbin/iked/pfkey.c
+++ b/sbin/iked/pfkey.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfkey.c,v 1.73 2020/12/01 22:43:30 tobhe Exp $ */
+/* $OpenBSD: pfkey.c,v 1.74 2020/12/04 16:18:14 tobhe Exp $ */
/*
* Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org>
@@ -1230,7 +1230,8 @@ pfkey_write(int sd, struct sadb_msg *smsg, struct iovec *iov, int iov_cnt,
}
if ((n = writev(sd, iov, iov_cnt)) == -1) {
- log_warn("%s: writev failed", __func__);
+ log_warn("%s: writev failed: type %u len %zd",
+ __func__, smsg->sadb_msg_type, len);
return (-1);
} else if (n != len) {
log_warn("%s: short write", __func__);