Attention is currently required from: Hoernchen, pespin.
laforge has posted comments on this change by laforge. ( https://gerrit.osmocom.org/c/libosmocore/+/37874?usp=email )
Change subject: core/socket.c: Fix socket binding on IPv4-only hosts ......................................................................
Patch Set 1:
(2 comments)
Commit Message:
https://gerrit.osmocom.org/c/libosmocore/+/37874/comment/caaa80d1_dd2f0504?u... : PS1, Line 19: > valid as a configured address. *This flag is useful on, for example,
so does that mean that if I have a system with no net card, then getaddrinfo() will fail to provide […]
I guess we'd have to test that.
File src/core/socket.c:
https://gerrit.osmocom.org/c/libosmocore/+/37874/comment/4ab292cc_ac1623b3?u... : PS1, Line 85: rc = getaddrinfo(host, portbuf, &hints, &result);
what about, if result from getaddrinfo is empty (result==NULL), then call getaddrinfo again without […]
That might be an option. The other option would be to keep the call as-is, but perform some manual post-processing of the result before passing it to the addrinfo_helper caller.
I still think it's weird for getaddrinfo to ever return anything IPv6 on a system that has no CONFIG_INET6 in the kernel at all. I guess glibc simply doesn't care what the kernel supports or doesn't support. In any case, even if we fixed glibc, it would take ages to propagate.