[GH-ISSUE #2098] Musl's getaddrinfo cannot resolve peer names from Netbird's client DNS #4248

Open
opened 2026-08-05 00:56:40 -04:00 by saavagebueno · 0 comments
Owner

Originally created by @glaeqen on GitHub (Jun 5, 2024).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/2098

Describe the problem

Programs linked against muslc cannot resolve the peer name against a DNS provided by Netbird client . getaddrinfo with default addrinfo returns EAI_NONAME.

Musl's getaddrinfo with default settings (specifically addrinfo.af_family == AF_UNSPEC) asks for both A and AAAA entry. If any response contains a flag "No such name", error EAI_NONAME is returned. This behaviour is different in glibc. Relevant mailing list: https://www.openwall.com/lists/musl/2021/07/19/8

To Reproduce

Steps to reproduce the behavior:
0. Connect to a netbird network.

  1. $ docker run --network host -it alpine
  2. In a container: $ ping <valid-peer-domain-name>
  3. Failure occurs

You can also see that choosing to resolve only IPv4 works
$ ping -4 <valid-peer-name

Expected behavior

Proper peer name resolution. Not sure what Netbird's DNS should do but DNSes for example for github.com seem to respond with an empty response but a flag is "No error" instead of "No such name"? Not sure.

Thanks a lot.

Originally created by @glaeqen on GitHub (Jun 5, 2024). Original GitHub issue: https://github.com/netbirdio/netbird/issues/2098 **Describe the problem** Programs linked against `muslc` cannot resolve the peer name against a DNS provided by Netbird client . `getaddrinfo` with default `addrinfo` returns `EAI_NONAME`. Musl's `getaddrinfo` with default settings (specifically `addrinfo.af_family == AF_UNSPEC`) asks for both `A` and `AAAA` entry. If *any* response contains a flag "No such name", error `EAI_NONAME` is returned. This behaviour is different in glibc. Relevant mailing list: https://www.openwall.com/lists/musl/2021/07/19/8 **To Reproduce** Steps to reproduce the behavior: 0. Connect to a netbird network. 1. `$ docker run --network host -it alpine` 2. In a container: `$ ping <valid-peer-domain-name>` 3. Failure occurs You can also see that choosing to resolve only IPv4 works `$ ping -4 <valid-peer-name` **Expected behavior** Proper peer name resolution. Not sure what Netbird's DNS should do but DNSes for example for `github.com` seem to respond with an empty response but a flag is "No error" instead of "No such name"? Not sure. Thanks a lot.
saavagebueno added the system-compatibility-issuetriage-needed labels 2026-08-05 00:56:40 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#4248