aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2020-06-03 00:32:58 +0200
committerAlexander Couzens <lynxis@fe80.eu>2020-06-03 00:33:07 +0200
commit096c71ae60ee16243986575eb0bfa21a6d5cb8a9 (patch)
tree08550dc118a9f231649893ec895f25ed4e7bbdf8
parentgitlab-ci: try to fix artifacts (diff)
downloadlibosmo-abis-lynxis/ipv6.tar.xz
libosmo-abis-lynxis/ipv6.zip
ipa: use AF_UNSPEC instead of AF_INETlynxis/ipv6
To allow IPv6 use AF_UNSPEC. AF_UNSPEC allows to be IPv4 or IPv6 address at the same time. TODO: check if osmo_sock_init() is also prefering IPv6 TODO: how to allow the user to specify if IPv4 or IPv6 should be taken. Change-Id: I5b740c46a850b35f9012d7f78394f55408889136
-rw-r--r--src/input/ipa.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/input/ipa.c b/src/input/ipa.c
index 0f67dca..8609755 100644
--- a/src/input/ipa.c
+++ b/src/input/ipa.c
@@ -225,7 +225,7 @@ int ipa_client_conn_open(struct ipa_client_conn *link)
int ret;
link->state = IPA_CLIENT_LINK_STATE_CONNECTING;
- ret = osmo_sock_init2(AF_INET, SOCK_STREAM, IPPROTO_TCP,
+ ret = osmo_sock_init2(AF_UNSPEC, SOCK_STREAM, IPPROTO_TCP,
link->local_addr, link->local_port,
link->addr, link->port,
OSMO_SOCK_F_BIND|OSMO_SOCK_F_CONNECT|OSMO_SOCK_F_NONBLOCK);
@@ -336,7 +336,7 @@ int ipa_server_link_open(struct ipa_server_link *link)
{
int ret;
- ret = osmo_sock_init(AF_INET, SOCK_STREAM, IPPROTO_TCP,
+ ret = osmo_sock_init(AF_UNSPEC, SOCK_STREAM, IPPROTO_TCP,
link->addr, link->port, OSMO_SOCK_F_BIND);
if (ret < 0)
return ret;