Attention is currently required from: arehbein. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/35073?usp=email )
Change subject: port from osmo_stream_*_get_ofd() to osmo_stream_srv_get_fd() ...................................................................... Patch Set 1: (1 comment) File src/osmo_ss7_asp.c: https://gerrit.osmocom.org/c/libosmo-sccp/+/35073/comment/3820fecd_d0282112 PS1, Line 915: return ipa_rx_msg(asp, msg, fd & 0xf); > probably very problematic without a check `if (fd < 0)` ... […] no, not problematic at all. All we're doing here is choosing the SLS (link selector within a linkset). That's basically a "random" number between 0..15 (hence the 0xF). We're just abusing the property that file descriptors lower 4 bits are presumably "reasonably distributed" so that we get some spread over different SLS. I would argue fd < 0 can never happen in the first place, as the function is only called in a context where the file dscriptor is long initialized, as we're alreay reading data. But let's assume the fd would be negative: All we'd do is tale the lower 4 bits of -1 (0xF) and use that as SLS. Nothing wrong with that. -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/35073?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I12c66badfb4bdfdfe71f1716de960d353d3548b1 Gerrit-Change-Number: 35073 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <lafo...@osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: arehbein <arehb...@sysmocom.de> Gerrit-Reviewer: daniel <dwillm...@sysmocom.de> Gerrit-Attention: arehbein <arehb...@sysmocom.de> Gerrit-Comment-Date: Tue, 21 Nov 2023 19:16:26 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: arehbein <arehb...@sysmocom.de> Gerrit-MessageType: comment