From 05bf702f4a9ce3c62c1fbbbb762bafa93d7dc6ea Mon Sep 17 00:00:00 2001 From: Michael Tokarev Date: Mon, 23 Dec 2024 23:26:52 +0300 Subject: [PATCH] silence DNS lookup mismatch messages MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit There's just too much useless noise in the logs, especially when the PTR record just doesn't exist. Signed-off-by: Michael Tokarev Reviewed-by: Andreas Schneider Reviewed-by: Pavel Filipenský --- source3/lib/util_sock.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c index 5ff875c230d..5b4d7f12cef 100644 --- a/source3/lib/util_sock.c +++ b/source3/lib/util_sock.c @@ -709,10 +709,10 @@ static bool matchname(const char *remotehost, if (ailist->ai_canonname == NULL || (!strequal(remotehost, ailist->ai_canonname) && !strequal(remotehost, "localhost"))) { - DEBUG(0,("matchname: host name/name mismatch: %s != %s\n", + DBG_INFO("host name/name mismatch: %s != %s\n", remotehost, ailist->ai_canonname ? - ailist->ai_canonname : "(NULL)")); + ailist->ai_canonname : "(NULL)"); freeaddrinfo(ailist); return false; } @@ -735,12 +735,12 @@ static bool matchname(const char *remotehost, * it, but that could be dangerous, too. */ - DEBUG(0,("matchname: host name/address mismatch: %s != %s\n", + DBG_INFO("host name/address mismatch: %s != %s\n", print_sockaddr_len(addr_buf, sizeof(addr_buf), pss, len), - ailist->ai_canonname ? ailist->ai_canonname : "(NULL)")); + ailist->ai_canonname ? ailist->ai_canonname : "(NULL)"); if (ailist) { freeaddrinfo(ailist); @@ -891,7 +891,7 @@ int get_remote_hostname(const struct tsocket_address *remote_address, TALLOC_FREE(p); } else { if (!matchname(name_buf, (struct sockaddr *)&ss, len)) { - DEBUG(0,("matchname failed on %s\n", name_buf)); + DBG_INFO("failed on %s\n", name_buf); strlcpy(name_buf, "UNKNOWN", sizeof(name_buf)); } } -- 2.47.3