[XS] Change in libosmocore[master]: core/socket.c: Fix socket binding on IPv4-only hosts
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. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/37874?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I5690a25af98089e3a8a092cb91dfc969720abdc0 Gerrit-Change-Number: 37874 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge@osmocom.org> Gerrit-Reviewer: Hoernchen <ewild@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin@sysmocom.de> Gerrit-Attention: Hoernchen <ewild@sysmocom.de> Gerrit-Attention: pespin <pespin@sysmocom.de> Gerrit-Comment-Date: Tue, 20 Aug 2024 10:18:25 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin@sysmocom.de>
participants (1)
-
laforge