While writing a response to mdns or mdns_minimal question of Fedora devel list, I have realized nss-mdns is too naive when parsing /etc/mdns.allow configuration.
I think nss-dns plugin of glibc could be an inspiration for a well working basic caching of configuration. I think it does some smartness about /etc/resolv.conf parsing. We want to avoid unnecessary file reading on every query request, which current mdns? plugin variants does IMO. If we could cache missing file /etc/mdns.allow, we could use just single variant.
We could as well fetch list of domains to use from avahi-daemon itself and cache that. That way we could receive instructions how to handle IPv4 and IPv6 separately, which would allow to use just single mdns plugin instead of 6 separate plugins provided now.
While writing a response to mdns or mdns_minimal question of Fedora devel list, I have realized nss-mdns is too naive when parsing
/etc/mdns.allowconfiguration.I think nss-dns plugin of glibc could be an inspiration for a well working basic caching of configuration. I think it does some smartness about /etc/resolv.conf parsing. We want to avoid unnecessary file reading on every query request, which current
mdns?plugin variants does IMO. If we could cache missing file /etc/mdns.allow, we could use just single variant.We could as well fetch list of domains to use from avahi-daemon itself and cache that. That way we could receive instructions how to handle IPv4 and IPv6 separately, which would allow to use just single
mdnsplugin instead of 6 separate plugins provided now.