laforge submitted this change.
stream_cli: fix this API for AF_UNIX sockets
Osmocom Stream Client and Server functional layers provided by this
library are primarily used for TCP and SCTP over IP, but they also
support AF_UNIX local sockets. stream_srv does work for AF_UNIX
and has been used successfully in that application, but stream_cli
exhibits a bug: it passes both SOCK_F_CONNECT and SOCK_F_BIND to
osmo_sock_unix_init(), but having both of these flags set is invalid
for the latter API. The correct course is to pass only
SOCK_F_CONNECT when initializing an AF_UNIX socket in the client
role - fix it.
Change-Id: I80e1c697377946ee93cb2939ab7e8914deb824f9
---
M src/stream_cli.c
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/stream_cli.c b/src/stream_cli.c
index a8b5fa6..0f911b7 100644
--- a/src/stream_cli.c
+++ b/src/stream_cli.c
@@ -1260,7 +1260,7 @@
switch (cli->sk_domain) {
case AF_UNIX:
- ret = osmo_sock_unix_init(cli->sk_type, 0, cli->addr[0], OSMO_SOCK_F_CONNECT|OSMO_SOCK_F_BIND|OSMO_SOCK_F_NONBLOCK);
+ ret = osmo_sock_unix_init(cli->sk_type, 0, cli->addr[0], OSMO_SOCK_F_CONNECT|OSMO_SOCK_F_NONBLOCK);
break;
case AF_INET:
case AF_INET6:
To view, visit change 44065. To unsubscribe, or for help writing mail filters, visit settings.