Cross-platform Electron desktop app for managing periodic breaks.
Runs as a system tray application with notifications and fullscreen
break overlays. Homepage:
https://github.com/tom-james-watson/breaktimer-app
Assisted-by: opencode (z-ai GLM-5.2)
Previously, enabling nssmdns would enable the full mdns module by
default, as well as the minimal one. Unfortunately, the full mdns module
introduces a 5 second delay whenever it fails to perform a reverse
hostname lookup (`gethostbyaddr`).
For example, this adds a 5 second delay to ping as follows:
1. Ping resolves the hostname (example.com) to an IP address. This query
is serviced by the user's DNS resolver, so it returns quickly.
2. Ping attempts to resolve the IP address back into a hostname via
`gethostbyaddr`.
3. If the upstream DNS server fails to resolve the IP address back into
a hostname (many domain-names lack reverse DNS records), NSS falls
back on querying via Avahi (via the `mdns` module).
4. mDNS is a broadcast protocol, so Avahi has to wait the full 5 second
timeout before it can return a failure.
This patch fixes this by disabling the full `mdns` NSS module unless the
new disabled-by-default `nssmdnsFull` option is enabled. The
still-enabled `mdns_minimal` module only performs reverse IP lookups for
`169.254.0.0/16` (link-local IP addresses) so this 5 second delay will
only apply to link-local pings by domain-name.
In practice, this change shouldn't negatively affect the vast majority
of users. The only affected users are those who:
1. Are relying on Avahi to resolve IP addresses into hostnames on their
local network via `gethostbyaddr`.
2. Are using mDNS hostnames that don't end in `.local`.
The minimal module is sufficient for, e.g., users who just want to
resolve hostnames for local printers and network shares.
Note: This patch not fix this by adding [!UNAVAIL=return] after `dns` as
discussed in (#291108) as that would treat mDNS as a fallback for DNS when
DNS is unavailable which, IMO, is incorrect. Whether or not we use mDNS
shouldn't depend on whether or not our DNS server is available.
fixes#291108