Attention is currently required from: osmith.
pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40006?usp=email )
Change subject: asp: Rename and clarify asp_id field
......................................................................
Patch Set 1:
(1 comment)
File src/xua_asp_fsm.c:
https://gerrit.osmocom.org/c/libosmo-sigtran/+/40006/comment/e0b8c081_87bf4… :
PS1, Line 219: xua_msg_add_u32(xua, SUA_IEI_ASP_ID, asp->asp_id);
> the commit message only talks about renaming the field, but here the logic is changed to not send th […]
I'm already explaining it in the commit msg:
"and using this same value when sending
our own ASP Identifier during ASPUP.
This was not causing a problem since actually we have no real way to set
asp_id_present on our own in ASP mode yet, so no local ASP Identifier is
ever being transmitted."
It makes more sense to do it here, because this commit is not omly a "rename" commit but a "clarify and rename" commit, and both need to go together since 2 different uses were entangled in the same field.
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40006?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I8e4304099db6fb12cf4b40a5b9a4aa3a83c95fde
Gerrit-Change-Number: 40006
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 11 Apr 2025 13:02:29 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: osmith <osmith(a)sysmocom.de>
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40001?usp=email )
Change subject: ipa: Use pseudo-random number for SLS in TCP-client too
......................................................................
ipa: Use pseudo-random number for SLS in TCP-client too
Previous commit (see below) replaced the SLS generation from using
the LSB of the file descriptor to a pseudo-random SLS since the former
didn't really achieve enough entropy in real world use cases.
However, that commit only applied it for TCP-server conns, but forgot to
update TCP-client ones.
Present commit fixes that missing part. asp->asp_id is already being set
using a pseudo-randome number in xua_cli_connect_cb().
Fixes: 2c9ba16c2c0210a189c72064eafad5ef336254cd
Related: SYS#6543
Related: SYS#6802
Change-Id: I837505868b608ac5ed658a7e98bb3eeebe3e852c
---
M src/osmo_ss7_asp.c
1 file changed, 3 insertions(+), 4 deletions(-)
Approvals:
osmith: Looks good to me, approved
Jenkins Builder: Verified
fixeria: Looks good to me, but someone else must approve
diff --git a/src/osmo_ss7_asp.c b/src/osmo_ss7_asp.c
index 3f6500c..f785264 100644
--- a/src/osmo_ss7_asp.c
+++ b/src/osmo_ss7_asp.c
@@ -1027,7 +1027,6 @@
/* read call-back for IPA/SCCPlite socket */
static int ipa_cli_read_cb(struct osmo_stream_cli *conn, int res, struct msgb *msg)
{
- int fd = osmo_stream_cli_get_fd(conn);
struct osmo_ss7_asp *asp = osmo_stream_cli_get_data(conn);
if (res <= 0) {
@@ -1042,9 +1041,9 @@
msg->dst = asp;
rate_ctr_inc2(asp->ctrg, SS7_ASP_CTR_PKT_RX_TOTAL);
- /* we can use the 'fd' return value of osmo_stream_srv_get_fd() here unverified as all we do
- * is 'roll the dice' to obtain a 4-bit SLS value. */
- return ipa_rx_msg(asp, msg, fd & 0xf);
+ /* we simply use the lower 4 bits of the asp_id, which is initialized to a pseudo-random value upon
+ * connect */
+ return ipa_rx_msg(asp, msg, asp->asp_id & 0xf);
}
/* read call-back for M3UA-over-TCP socket */
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40001?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I837505868b608ac5ed658a7e98bb3eeebe3e852c
Gerrit-Change-Number: 40001
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Attention is currently required from: pespin.
osmith has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40006?usp=email )
Change subject: asp: Rename and clarify asp_id field
......................................................................
Patch Set 1:
(1 comment)
File src/xua_asp_fsm.c:
https://gerrit.osmocom.org/c/libosmo-sigtran/+/40006/comment/716ca9cf_8965c… :
PS1, Line 219: xua_msg_add_u32(xua, SUA_IEI_ASP_ID, asp->asp_id);
the commit message only talks about renaming the field, but here the logic is changed to not send the identifier anymore in peer_send(). Probably makes sense to mention that in the commit message (or possibly split it out into a separate patch as it is a separate logical change and the commit msg is quite long already?)
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40006?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I8e4304099db6fb12cf4b40a5b9a4aa3a83c95fde
Gerrit-Change-Number: 40006
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 11 Apr 2025 08:32:31 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No