You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
dns: getaddrinfo() differences between glibc and musl #2225
Maybe. glibc's default seems more useful than musl's. We'd have to think through the implications but I wouldn't dismiss outright the idea of making AI_ADDRCONFIG|AI_V4MAPPED the default in v1.x.
if I'm remembering correctly, Node.js had a number of issues reported around using AI_ADDRCONFIG|AI_V4MAPPED by default.
Maybe. glibc's default seems more useful than musl's. We'd have to think through the implications but I wouldn't dismiss outright the idea of making AI_ADDRCONFIG|AI_V4MAPPED the default in v1.x.
I tend to agree. If we're going to set a default I would go for glibc's and tbh it seems more like a bug on our side not having the same behavior across platform, so I would vote for doing this in v1.x
Reacted by Quentin Jaccarino, Vladimír Čunát, treysis and Bruno Penteado
I tend to agree. If we're going to set a default I would go for glibc's and tbh it seems more like a bug on our side not having the same behavior across platform, so I would vote for doing this in v1.x
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Additionally, the glibc solution assumes that loopback interfaces are routeable when their IP are different than 127.0.0.1 or ::1. With musl the logic is inverted. nodejs/node#33279 (comment)
I would like to note, this musl libc6 difference seems to be problematic for busybox ntpd client, tends to end up failing to update time over IPv6....
I'm equally unclear if musl libc should be trying to read a /etc/gai.conf but, I do think, it should behave more like glibc defaults in terms of ordering responses....
The glibc behavior is explicitly wrong (contrary to spec):
If hints is a null pointer, the behavior shall be as if it referred to a structure containing the value zero for the ai_flags, ai_socktype, and ai_protocol fields, and AF_UNSPEC for the ai_family field.
Further, I think libuv must be doing something badly wrong in order to get the described behavior, since (musl's) getaddrinfo sorts the results with routable ones before non-routable ones.
Activity
cjihrig commentedon Mar 26, 2019
This would have to be a v2 thing, right?
As a side note, if I'm remembering correctly, Node.js had a number of issues reported around using
AI_ADDRCONFIG|AI_V4MAPPEDby default.bnoordhuis commentedon Mar 26, 2019
Maybe. glibc's default seems more useful than musl's. We'd have to think through the implications but I wouldn't dismiss outright the idea of making
AI_ADDRCONFIG|AI_V4MAPPEDthe default in v1.x.Yes, although they weren't our bug, it was glibc's (and uclibc's, IIRC): nodejs/node#5436 (comment)
santigimeno commentedon Mar 26, 2019
I tend to agree. If we're going to set a default I would go for glibc's and tbh it seems more like a bug on our side not having the same behavior across platform, so I would vote for doing this in v1.x
saghul commentedon Mar 27, 2019
+1
stale commentedon Nov 8, 2019
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
stale commentedon Jan 13, 2020
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
szmarczak commentedon May 9, 2020
Additionally, the
glibcsolution assumes that loopback interfaces are routeable when their IP are different than127.0.0.1or::1. Withmuslthe logic is inverted. nodejs/node#33279 (comment)SimonIremonger commentedon Dec 30, 2020
I would like to note, this musl libc6 difference seems to be problematic for busybox ntpd client, tends to end up failing to update time over IPv6....
I'm equally unclear if musl libc should be trying to read a /etc/gai.conf but, I do think, it should behave more like glibc defaults in terms of ordering responses....
richfelker commentedon Jan 23, 2021
The glibc behavior is explicitly wrong (contrary to spec):
Further, I think libuv must be doing something badly wrong in order to get the described behavior, since (musl's)
getaddrinfosorts the results with routable ones before non-routable ones.Revert "ping: fix ping6 name resolution for hostnames with link-local…
Revert "ping: fix ping6 name resolution for hostnames with link-local…
Revert "ping: fix ping6 name resolution for hostnames with link-local…