Pass avahi-daemon parallel IPv4/6 queries#98
Conversation
This optimizes the query time. glibc patches are required to ensure `getent ahosts` uses _nss_mdns_gethostbyname4_r. Closes: avahi#83
|
I am afraid it won't be so simple. RESOLVE-HOSTNAME command can return only 1 IP address. We need to modify it to return multiple addresses. For AAAA and A records, each can have multiple addresses.
|
The second half should be another PR. I am preserving the existing behavior of home@daniel-desktop3:~$ getent ahosts daniel-tablet1.local
192.168.3.91 STREAM daniel-tablet1.local
192.168.3.91 DGRAM
192.168.3.91 RAW
home@daniel-desktop3:~$
There might be a change for dual IPv4/IPv6 networks. Do we really want to return both IPv4 and IPv6 addresses? @evverx objected to my avahi/avahi#765 (comment) PR saying "nss-mdns ... [should use] |
I closed that PR because it changed the Avahi public API in the sense that it was no longer possible to send AAAA queries over IPv4 for example. @danielzgtg can you maybe open an issue based on avahi/avahi#765 (comment) (where you mentioned that with |
|
I'll rewrite this PR to use I'll PR systemd about |
I'm not sure varlink: New incoming connection.
varlink: Connections of user 1000: 0 (of 576 max)
varlink-15-15: Setting state idle-server
varlink-15-15: Received message: {"method":"io.systemd.Resolve.ResolveHostname","parameters":{"name":"freebsd.local","family":10,"flags":0}}
varlink-15-15: Changing state idle-server → processing-method
idn2_lookup_u8: freebsd.local → freebsd.local
Looking up RR for freebsd.local IN AAAA.
Failed to connect to /run/systemd/resolve.hook/io.systemd.Network: Connection refused
Socket '/run/systemd/resolve.hook/io.systemd.Network' is not connectible, probably stale, ignoring: Connection refused
varlink-15-15: Sending message: {"error":"io.systemd.Resolve.NoNameServers"}
varlink-15-15: Changing state processing-method → processed-method
varlink-15-15: Changing state processed-method → idle-server
varlink-15-15: Changing state idle-server → pending-disconnect
varlink-15-15: Changing state pending-disconnect → processing-disconnect
varlink-15-15: Changing state processing-disconnect → disconnectedAs far as I understand it would mean that for example Fedora by default ships configs that leak all the |
|
That being said it doesn't look like queries actually go anywhere so I'm not sure what happens in your case. Either way can you open an issue and attach as many details as possible? |
|
After rereading @pemensik's comment, I realized $ /home/home/CLionProjects/nss-mdns/avahi-test daniel-tablet1.local
AF_INET: 192.168.3.91
AF_UNSPEC: 192.168.3.91
AF_UNSPEC (count): 2
AF_UNSPEC (list): 192.168.3.91
AF_UNSPEC (list): fe80::8e40:17a:41ab:2a9f
REVERSE: daniel-tablet1.local
AF_INET6: fe80::8e40:17a:41ab:2a9f@evverx Sorry I meant having the |
|
My use case is satisfied by systemd/systemd#39800, which additionally fixes the extra DNS SOA packet. What remains in this PR is focused solely on #83. |

This optimizes the query time.
glibc patches are required to ensure
getent ahostsuses_nss_mdns_gethostbyname4_r. As such, this is untested until the patches land.Closes: #83