At Tue, 11 Nov 2025 15:13:14 -0800, "Greg A. Woods" <woods%planix.ca@localhost> wrote: Subject: problems using "hosts: mdnsd" in /etc/nsswitch.conf > > Does anyone happen to have a working configuration where you are > successfully using the "mdnsd" source for the "hosts" database in > /etc/nsswitch.conf? (i.e. without also listing "dns" as a source) > > I've been unable to get this to work properly either on NetBSD-10 or in > my locally hacked tree, or in 10.99.11 (an old -current I have running). I've upgraded my "nbday" host to yesterday's daily. No luck. It does not work. Neither is it possible to debug it in the current situation as logging is "permanently" disabled. BTW, I see that logging was working briefly in -current, but someone complained that it was spamming the console (apparently without understanding the real problem): PR#58778 Unfortunately the fix applied for PR#58778 was also done without understanding the problem resulting in making mdnsd un-debug-able again. I'm not even sure the change applied would actually stop the messages being complained about. (The LogMsg() macro does not use/respect the mDNS_LoggingEnabled flag!) Not that the mDNSResponder code is very debug-able in the first place, but having no logging and no debug support, despite claims to the contrary in the manual page. I.e. even the '-debug' command-line flag is nearly non-functional if mDNS_LoggingEnabled is zero. Defaulting mDNS_LoggingEnabled to non-zero is really the only correct thing to do given how the code is implemented. Previously Roy had been making some careful fixes to adjust the severity level of various log messages to avoid complaining about errors that were not errors. In my recent experience though the ones complained about in the PR are more likely to be evidence of real problems. In any case if one doesn't want real error messages to "spam" the console then the only correct fix is to change the syslog configuration to avoid that. Hard-coding a program such that it can never log any messages is never a good solution. -- Greg A. Woods <gwoods%acm.org@localhost> Kelowna, BC +1 250 762-7675 RoboHack <woods%robohack.ca@localhost> Planix, Inc. <woods%planix.com@localhost> Avoncote Farms <woods%avoncote.ca@localhost>
Attachment:
pgpdmLo4u2HrI.pgp
Description: OpenPGP Digital Signature