Hi All,
I'm using gnupg on Arch Linux with systemd-resolved stub mode (which means nameserver 127.0.0.53 in resolv.conf).
With the default setup operations like gpg --keyserver pgp.example.com --search-keys ... take ages on my PC. I tracked this down and found out it's related to dirmngr's dns resolver.
When I'm using dirmngr --standard-resolver ... the issue goes away.
I put systemd-resoved in debug mode (SYSTEMD_LOG_LEVEL=debug) and it complains about malformed dns queries
I took a look to queries using wireshark and as you can see it's missing the Type & Class fields (usually IN & A, or IN & AAAA, ...) Here's a screenshot:
systemd-resolved[896445]: Received dns UDP packet of size 62, ifindex=0, ttl=64, fragsize=0 systemd-resolved[896445]: Got DNS stub UDP query packet for id 59721 systemd-resolved[896445]: Failed to extract resources from incoming packet, ignoring packet: Bad message systemd-resolved[896445]: Sending response packet with id 59721 on interface 1/AF_INET of size 12. systemd-resolved[896445]: Received dns UDP packet of size 62, ifindex=0, ttl=64, fragsize=0 systemd-resolved[896445]: Got DNS stub UDP query packet for id 59721 systemd-resolved[896445]: Failed to extract resources from incoming packet, ignoring packet: Bad message systemd-resolved[896445]: Sending response packet with id 59721 on interface 1/AF_INET of size 12.
Apparently this issue has been reported and fixed in the past https://dev.gnupg.org/T3803
So it may have reappeared?
Thank you,
Pierre