From 8eecffca857a5bc47d928c4e5ba59d316e81220d Mon Sep 17 00:00:00 2001 From: DL6ER Date: Thu, 10 Sep 2026 22:14:37 +0200 Subject: [PATCH] Also honor `misc.hide_connection_error` in pihole.log `FTL_connection_error()` writes the same event twice: through `log_connection_error()` into FTL.log and the message table, and through `my_syslog()` into pihole.log. Only the first one was gated, and the second is not subject to the five-second throttle, so the setting left the more frequent of the two lines in place. Signed-off-by: DL6ER --- src/dnsmasq_interface.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/dnsmasq_interface.c b/src/dnsmasq_interface.c index 632518ce0..d22f0262f 100644 --- a/src/dnsmasq_interface.c +++ b/src/dnsmasq_interface.c @@ -4349,8 +4349,9 @@ void FTL_connection_error(const char *reason, const union mysockaddr *addr, cons // Log to FTL.log log_debug(DEBUG_QUERIES, "Connection error (%s#%u, ID %d): %s (%s)%s", ip, port, id, reason, error, extra); - // Log to pihole.log - my_syslog(priority, "%s: %s", reason, error); + // Log to pihole.log (unless the user asked us to hide these warnings) + if(!config.misc.hide_connection_error.v.b) + my_syslog(priority, "%s: %s", reason, error); // Add to Pi-hole diagnostics but do not add messages more often than // once every five seconds to avoid hammering the database with errors