Date: Tue, 5 Jan 2021 10:02:37 +0300 From: Vasily Postnicov <shamaz.mazum@gmail.com> To: freebsd-net@freebsd.org Subject: DNS using Name Service Switch module and Casper Message-ID: <CADnZ6Bke=9%2B_pMc6rkbheNUWS-H6_X14%2Bf%2BWz5cfUCD=BTwk=g@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Hello. I wrote a simple daemon called ZeroDNS which provides functionality similar to multicast DNS, namely it discovers other participating machines over the LAN and stores their hostname and IPv4 address pairs. Here is a NSS module which allows the system to use information from that daemon: https://github.com/shamazmazum/nss-zero-dns You need to modify /etc/nsswitch.conf, changing the line 'hosts: files dns' to 'hosts: files dns zerodns'. It all works on FreeBSD 12.2-RELEASE, but sometimes not on 13.0-CURRENT. For example, ping(8) just blocks when trying to ping a host whose name is resolvable with ZeroDNS. Turns out that programs built with casper support (like ping(8) and some others) stop working with my NSS module (they just block trying to resolve the name). Is there some kind of manual on how to write casper-compatible NSS modules?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADnZ6Bke=9%2B_pMc6rkbheNUWS-H6_X14%2Bf%2BWz5cfUCD=BTwk=g>
