Change in libosmo-abis[master]: ipa: do not open socket in nonblocking mode

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

dexter gerrit-no-reply at lists.osmocom.org
Fri May 21 20:19:38 UTC 2021


dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-abis/+/24332 )


Change subject: ipa: do not open socket in nonblocking mode
......................................................................

ipa: do not open socket in nonblocking mode

The function ipa_client_conn_open opens an osmo-socket using
osmo_sock_init2 and sets the OSMO_SOCK_F_NONBLOCK. This makes error
detection (e.g. host is unreachable) difficult because the connect call
will return with -EINPROGRESS, which is not handled as an error, so
opening a socket to any random ip-address will be successful.

Change-Id: I926a75920f7a15c670f7445f2e74e876c5fad7be
Related: SYS#4971
---
M src/input/ipa.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/32/24332/1

diff --git a/src/input/ipa.c b/src/input/ipa.c
index c121987..6bc3f4a 100644
--- a/src/input/ipa.c
+++ b/src/input/ipa.c
@@ -224,7 +224,7 @@
 	ret = osmo_sock_init2(AF_INET, 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|
+			     OSMO_SOCK_F_BIND|OSMO_SOCK_F_CONNECT|
 			     OSMO_SOCK_F_DSCP(link->dscp) | OSMO_SOCK_F_PRIO(link->priority));
 	if (ret < 0)
 		return ret;

-- 
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/24332
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I926a75920f7a15c670f7445f2e74e876c5fad7be
Gerrit-Change-Number: 24332
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210521/eebcf4ce/attachment.htm>


More information about the gerrit-log mailing list