lower dns lookup mismatch messages
authorMichael Tokarev <mjt@tls.msk.ru>
Fri, 1 Mar 2024 13:16:20 +0000 (16:16 +0300)
committerMichael Tokarev <mjt@tls.msk.ru>
Sun, 12 Jan 2025 20:16:00 +0000 (23:16 +0300)
Forwarded: https://gitlab.com/samba-team/samba/-/merge_requests/3872

There's just too much useless noise in the logs,
especially when the PTR record just doesn't exist.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Gbp-Pq: Name lower-dns-lookup-mismatch-messages.patch

source3/lib/util_sock.c

index 5ff875c230dc065f3eed97e56108a52ac99c9672..b9237c3797e5356f8cd9cecc3567b765b4aacb31 100644 (file)
@@ -709,7 +709,7 @@ 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",
+               DEBUG(5,("matchname: host name/name mismatch: %s != %s\n",
                         remotehost,
                         ailist->ai_canonname ?
                                 ailist->ai_canonname : "(NULL)"));
@@ -735,7 +735,7 @@ static bool matchname(const char *remotehost,
         * it, but that could be dangerous, too.
         */
 
-       DEBUG(0,("matchname: host name/address mismatch: %s != %s\n",
+       DEBUG(5,("matchname: host name/address mismatch: %s != %s\n",
                print_sockaddr_len(addr_buf,
                        sizeof(addr_buf),
                        pss,
@@ -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));
+                       DEBUG(5,("matchname failed on %s\n", name_buf));
                        strlcpy(name_buf, "UNKNOWN", sizeof(name_buf));
                }
        }