Attention is currently required from: Hoernchen, laforge.

laforge uploaded patch set #2 to this change.

View Change

The following approvals got outdated and were removed: Verified-1 by Jenkins Builder

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

To view, visit change 37874. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I5690a25af98089e3a8a092cb91dfc969720abdc0
Gerrit-Change-Number: 37874
Gerrit-PatchSet: 2
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: laforge <laforge@osmocom.org>