summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authortobhe <tobhe@cvs.openbsd.org>2020-12-01 22:43:31 +0000
committertobhe <tobhe@cvs.openbsd.org>2020-12-01 22:43:31 +0000
commit1ce7a6763f6b75b851fc7ac30973cabf65ef7461 (patch)
tree70959e8b8dd04c0f433aa61241d722284ef8d12d /sbin
parente1c74a1dad15e7c8fb6eb7b5e12974fc7932a3d3 (diff)
Don't log ESRCH as warning.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/iked/pfkey.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/sbin/iked/pfkey.c b/sbin/iked/pfkey.c
index b8812f884e2..cbe6b4ffeea 100644
--- a/sbin/iked/pfkey.c
+++ b/sbin/iked/pfkey.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfkey.c,v 1.72 2020/11/05 19:28:27 phessler Exp $ */
+/* $OpenBSD: pfkey.c,v 1.73 2020/12/01 22:43:30 tobhe Exp $ */
/*
* Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org>
@@ -921,7 +921,10 @@ pfkey_sa_lookup(int sd, struct iked_childsa *sa, uint64_t *last_used)
if (msg->sadb_msg_errno != 0) {
errno = msg->sadb_msg_errno;
ret = -1;
- log_warn("%s: message", __func__);
+ if (errno == ESRCH)
+ log_debug("%s: not found", __func__);
+ else
+ log_warn("%s: message", __func__);
goto done;
}
if (last_used) {
@@ -1326,7 +1329,10 @@ pfkey_reply(int sd, uint8_t **datap, ssize_t *lenp)
if (datap == NULL && hdr.sadb_msg_errno != 0) {
errno = hdr.sadb_msg_errno;
if (errno != EEXIST) {
- log_warn("%s: message", __func__);
+ if (errno == ESRCH)
+ log_debug("%s: not found", __func__);
+ else
+ log_warn("%s: message", __func__);
return (-1);
}
}