[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Terrible mDNS responder

From: Sergey Bugaev
Subject: Terrible mDNS responder
Date: Fri, 3 Mar 2023 16:02:50 +0300


this is a shameless self-promotion :) I have posted about the Terrible
mDNS responder on Mastodon before, but not on this list, and I have
been making minor changes to it recently, so I thought I might as well
announce it here, perhaps it could be useful to someone.

Debian GNU/Hurd comes with Avahi in the default install (I believe).
Avahi has never worked for me (on the Hurd), and I doubt it has ever
worked for anyone else either. I *have* looked into the why (as in
spent hours debugging and patching it); I don't remember the
specifics, but I do remember that I concluded it won't be easy to make
it work. So, a dead end.

But I still wanted mDNS to work, for some definition of "work".
Namely, I wanted to be able to refer to my Hurd box by its symbolic
name, such as sergey-hurd-box.local (RIP) and hurdle.local, and not by
its DHCP-leased IP address, because that one is a chore to type and
remember, and could change in theory -- and it *did* change in
practice once I set up eth-multiplexer, which must have caused its MAC
to change (or something).

So I wrote the Terrible mDNS responder, named so because it's really
terrible and does not claim to be any good, quite the opposite, in
fact. So, caveat usor. But that being said, it works very well for me
in practice, does exactly what it was supposed to do (i.e. I can type
"hurdle.local" and it works) and never once in the multiple years of
use has it caused me any issue, not even a minor one, so maybe it's
not that terrible after all.

To be very clear, this does *not* teach the system to do mDNS queries
(.local hostname lookups), this only makes it respond to other host's
queries. (Those other hosts may be running Avahi or sd-rd or Apple's
mDNSResponder or LookupServer or ...)

The sources are over on GitHub [0]. There are no dependencies other
than a libc. It's built with Meson and licensed under AGPL v3+. It
even comes with an awkward attempt at a sysv init script! What's not
to like?

[0]: https://github.com/bugaevc/terrible-mdns-responder


P.S. Something like this should get you up & running:
$ git clone git@github.com:bugaevc/terrible-mdns-responder.git
$ cd terrible-mdns-responder
$ meson setup build
$ ninja -C build
$ sudo ninja install -C build
$ sudo update-rc.d terrible-mdns-responder defaults
$ sudo update-rc.d avahi-daemon disable
$ sudo service terrible-mdns-responder start

reply via email to

[Prev in Thread] Current Thread [Next in Thread]