diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2020-08-31 19:00:59 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2020-08-31 19:01:02 +0200 |
commit | d8cf52b993bf5c1f7721f838f68ba9e5e10d4774 (patch) | |
tree | 58deb0483721b6f9726b475fd2440db6912de043 /tests/socket | |
parent | d9e04177a263bb1ac1075c097fe4950f6c18f106 (diff) |
socket: Fix bug in osmo_sock_init2(AF_UNSPEC) matching IP versions
See previous commit for a bug description.
Fixes: 2c962f5de1eeea119cfac7d9d92db31c570353b9
Change-Id: I59bf4b4b3ed14766a5a5285923d1ffa9fc8b2294
Diffstat (limited to 'tests/socket')
-rw-r--r-- | tests/socket/socket_test.c | 2 | ||||
-rw-r--r-- | tests/socket/socket_test.err | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/tests/socket/socket_test.c b/tests/socket/socket_test.c index 5cf20b7e..ae771841 100644 --- a/tests/socket/socket_test.c +++ b/tests/socket/socket_test.c @@ -147,7 +147,7 @@ static int test_sockinit2(void) printf("Checking osmo_sock_init2(AF_UNSPEC) BIND on IPv4\n"); fd = osmo_sock_init2(AF_UNSPEC, SOCK_DGRAM, IPPROTO_UDP, "127.0.0.1", 0, NULL, 0, OSMO_SOCK_F_BIND); - OSMO_ASSERT(fd == -ENODEV); /* BUG! */ + OSMO_ASSERT(fd >= 0); talloc_free(name); diff --git a/tests/socket/socket_test.err b/tests/socket/socket_test.err index 37504e77..0f0f8da8 100644 --- a/tests/socket/socket_test.err +++ b/tests/socket/socket_test.err @@ -2,4 +2,3 @@ invalid: both bind and connect flags set: 0.0.0.0:0 invalid: you have to specify either BIND or CONNECT flags Unable to find a common protocol (IPv4 or IPv6) for local host: 127.0.0.1 and remote host: ::1. Unable to find a common protocol (IPv4 or IPv6) for local host: ::1 and remote host: 127.0.0.1. -Unable to find a common protocol (IPv4 or IPv6) for local host: 127.0.0.1 and remote host: (null). |