From 237a1010b39e77bb02a714c630f0d831e707a605 Mon Sep 17 00:00:00 2001 From: tobhe Date: Fri, 4 Dec 2020 16:18:15 +0000 Subject: Log pfkey type and message length on write failure. --- sbin/iked/pfkey.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sbin/iked') 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 @@ -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__); -- cgit v1.2.3