Attention is currently required from: Hoernchen, laforge.
Hello Hoernchen, Jenkins Builder, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/37874?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed: Verified-1 by Jenkins Builder
Change subject: core/socket.c: Fix socket binding on IPv4-only hosts ......................................................................
core/socket.c: Fix socket binding on IPv4-only hosts
Let's add the AI_ADDRCONFIG flag to prevent getaddrinfo() from returning IPv6 addresses on sytems that have no IPv6.
From the manpage:
If hints.ai_flags includes the AI_ADDRCONFIG flag, then IPv4 addresses are returned in the list pointed to by res only if the local system has at least one IPv4 address configured, and IPv6 addresses are returned only if the local system has at least one IPv6 address configured. The loopback address is not considered for this case as valid as a configured address. *This flag is useful on, for example, IPv4-only systems, to ensure that getaddrinfo() does not return IPv6 socket addresses that would always fail in connect(2) or bind(2).*
Change-Id: I5690a25af98089e3a8a092cb91dfc969720abdc0 Closes: OS#7074 --- M src/core/socket.c 1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/74/37874/2