Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/35232?usp=email
to look at the new patch set (#2).
Change subject: socket: Reimplement osmo_sock_init2_multiaddr()
......................................................................
socket: Reimplement osmo_sock_init2_multiaddr()
This is an attempt to fix several downsides of current
osmo_sock_init2_multiaddr() API, mainly the requirement to pass an explicit
local address (!NULL). It also now works fine if OSMO_SOCK_F_BIND flag
is not used.
This reimplementation is based on the follwing logic:
- If caller passed family=AF_INET or family=AF_INET6, that same family
is used and kernel will fail if something is wrong.
- If caller passes family=AF_UNSPEC, the function will try to find the
required family to create the socket. The decision is taken on the
assumption that an AF_INET6 socket can handle both AF_INET6 and AF_INET
addresses (through v4v6 mapping). Hence, if any of the addresses in the
local or remote set of addresses resolves through getaddrinfo() to an
IPv6 address, then AF_INET6 is used; AF_INET is used otherwise.
Related: OS#6279
Change-Id: I2641fbaca6f477404b094dbc53c0c1a3dd3fd2fd
---
M src/core/socket.c
1 file changed, 128 insertions(+), 44 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/32/35232/2
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35232?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I2641fbaca6f477404b094dbc53c0c1a3dd3fd2fd
Gerrit-Change-Number: 35232
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset