From 935c2f99aceeeed8f6ad674f0b14897fe00cc369 Mon Sep 17 00:00:00 2001 From: florian Date: Mon, 25 Jan 2021 16:56:59 +0000 Subject: [PATCH] Disable logging to syslog for libunbound. We are not getting anything useful for us out of it and it can be quite noisy when we are missing IPv4 or IPv6 addresses. It is still available when logging to stderr when running with -d. OK phessler --- sbin/unwind/resolver.c | 9 +++++---- sbin/unwind/unwind.8 | 6 ++++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/sbin/unwind/resolver.c b/sbin/unwind/resolver.c index e800d38280a..af18795e75a 100644 --- a/sbin/unwind/resolver.c +++ b/sbin/unwind/resolver.c @@ -1,4 +1,4 @@ -/* $OpenBSD: resolver.c,v 1.134 2021/01/24 18:29:15 florian Exp $ */ +/* $OpenBSD: resolver.c,v 1.135 2021/01/25 16:56:59 florian Exp $ */ /* * Copyright (c) 2018 Florian Obser @@ -498,7 +498,7 @@ resolver_dispatch_frontend(int fd, short event, void *bula) "%lu", __func__, IMSG_DATA_SIZE(imsg)); memcpy(&verbose, imsg.data, sizeof(verbose)); - if ((log_getverbose() & OPT_VERBOSE3) + if (log_getdebug() && (log_getverbose() & OPT_VERBOSE3) != (verbose & OPT_VERBOSE3)) restart_ub_resolvers(); log_setverbose(verbose); @@ -1257,13 +1257,14 @@ create_resolver(enum uw_resolver_type type) if (!log_getdebug()) { if((err = ub_ctx_set_option(res->ctx, "use-syslog:", - "yes")) != 0) { + "no")) != 0) { ub_ctx_delete(res->ctx); free(res); - log_warnx("error setting use-syslog: yes: %s", + log_warnx("error setting use-syslog: no: %s", ub_strerror(err)); return (NULL); } + ub_ctx_debugout(res->ctx, NULL); } break; diff --git a/sbin/unwind/unwind.8 b/sbin/unwind/unwind.8 index f1c8c5cc827..bb9812ed564 100644 --- a/sbin/unwind/unwind.8 +++ b/sbin/unwind/unwind.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: unwind.8,v 1.9 2020/10/29 17:28:12 solene Exp $ +.\" $OpenBSD: unwind.8,v 1.10 2021/01/25 16:57:00 florian Exp $ .\" .\" Copyright (c) 2018 Florian Obser .\" Copyright (c) 2016 Kenneth R Westerback @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: October 29 2020 $ +.Dd $Mdocdate: January 25 2021 $ .Dt UNWIND 8 .Os .Sh NAME @@ -92,6 +92,8 @@ Produce more verbose output. Multiple .Fl v options increase the verbosity. +Debug output from libunbound is only available when logging to +.Em stderr . .El .Sh FILES .Bl -tag -width "/var/db/unwind.keyXXX" -compact -- 2.20.1