pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/33335 )
Change subject: Set stream_cli/srv name to contain ASP + sockname
......................................................................
Set stream_cli/srv name to contain ASP + sockname
Upon connect/accept, update the name to contain both the ASP and the
sockname of the established socked. This allows easily identifying the
stream based on IP layer as well as upper xUA layer.
Example logs:
"""
stream.c:1193 SRV(m3ua,::1:2905) accept()ed new link from ::1 to port 2905
stream.c:1672 SRVCONN(asp-dyn-0,(r=::1:43568<->l=::1:2905)) connected read/write (what=0x1)
stream.c:1589 SRVCONN(asp-dyn-0,(r=::1:43568<->l=::1:2905)) message received
"""
"""
stream.c:521 CLICONN(asp0){CONNECTING} connection established
stream.c:552 CLICONN(asp0,(r=::1:2905<->l=::ffff:127.0.0.2:35911)){CONNECTED} connected read
stream.c:401 CLICONN(asp0,(r=::1:2905<->l=::ffff:127.0.0.2:35911)){CONNECTED} message received
"""
Depends: libosmo-netif.git I539a0d29d11348efe702f971965a55cf56db5c59
Change-Id: I05bc5f6c7795f62c1814c1c774287b41ee85a475
---
M TODO-RELEASE
M src/osmo_ss7.c
2 files changed, 31 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
osmith: Looks good to me, but someone else must approve
fixeria: Looks good to me, approved
diff --git a/TODO-RELEASE b/TODO-RELEASE
index 5406d05..000f9f3 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -8,5 +8,6 @@
# If any interfaces have been removed or changed since the last public release: c:r:0.
#library what description / commit summary line
libosmocore >1.8.0 uses new osmo_prim_operation_name()
+libosmo-netif > 1.3.0 uses osmo_stream_*_set_name()
libosmo-sccp add API osmo_ss7_asp_get_name(), osmo_ss7_asp_get_proto()
osmo_sccp_simple_client_on_ss7_id() behavior change: ASPs asp-clnt-* defined through VTY must explicitly configure "role" and "sctp-role"
\ No newline at end of file
diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c
index aba14b3..3851ab8 100644
--- a/src/osmo_ss7.c
+++ b/src/osmo_ss7.c
@@ -1623,6 +1623,7 @@
" client for ASP %s\n", asp->cfg.name);
return -1;
}
+ osmo_stream_cli_set_name(asp->client, asp->cfg.name);
osmo_stream_cli_set_nodelay(asp->client, true);
osmo_stream_cli_set_addrs(asp->client, (const char**)asp->cfg.remote.host, asp->cfg.remote.host_cnt);
osmo_stream_cli_set_port(asp->client, asp->cfg.remote.port);
@@ -2089,9 +2090,11 @@
* connection came in */
asp->server = srv;
asp->xua_server = oxs;
+
/* update the ASP socket name */
talloc_free(asp->sock_name);
asp->sock_name = talloc_reparent(link, asp, sock_name);
+ osmo_stream_srv_set_name(asp->server, asp->cfg.name);
/* make sure the conn_cb() is called with the asp as private
* data */
osmo_stream_srv_set_data(srv, asp);
@@ -2206,6 +2209,7 @@
oxs->cfg.local.port = local_port;
oxs->server = osmo_stream_srv_link_create(oxs);
+ osmo_stream_srv_link_set_name(oxs->server, osmo_ss7_asp_protocol_name(proto));
osmo_stream_srv_link_set_data(oxs->server, oxs);
osmo_stream_srv_link_set_accept_cb(oxs->server, xua_accept_cb);
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/33335
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I05bc5f6c7795f62c1814c1c774287b41ee85a475
Gerrit-Change-Number: 33335
Gerrit-PatchSet: 9
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/33385 )
Change subject: templates: also fix asp config in osmo-{bsc,sgsn}.cfg.tmpl
......................................................................
templates: also fix asp config in osmo-{bsc,sgsn}.cfg.tmpl
In change [1] I attempted to fix osmo-gsm-tester_virtual, but I did
not notice that the same problem also was in osmo-bsc.cfg.tmpl.
Also add the missing params to osmo-sgsn.cfg.tmpl.
Change-Id: I7b3adfa131a9dbb867b9ae68615da27191b021e5
Related: [1] Ie29589b46c65707089ff2b22c3b139b7b435cc95
---
M src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
M src/osmo_gsm_tester/templates/osmo-sgsn.cfg.tmpl
2 files changed, 19 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/85/33385/1
diff --git a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
index dd27da0..60f04cc 100644
--- a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
+++ b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
@@ -21,6 +21,8 @@
asp asp0 2905 0 m3ua
local-ip ${bsc.ip_address.addr}
remote-ip ${stp.ip_address.addr}
+ role asp
+ sctp-role client
as as0 m3ua
asp asp0
routing-key 2 0.0.2
diff --git a/src/osmo_gsm_tester/templates/osmo-sgsn.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-sgsn.cfg.tmpl
index 5d8ba90..825298d 100644
--- a/src/osmo_gsm_tester/templates/osmo-sgsn.cfg.tmpl
+++ b/src/osmo_gsm_tester/templates/osmo-sgsn.cfg.tmpl
@@ -18,6 +18,8 @@
! asp asp-clnt-OsmoSGSN-A 2905 0 m3ua
! local-ip ${sgsn.ip_address.addr}
! remote-ip stp.ip_address.addr
+! role asp
+! sctp-role client
! as as-clnt-OsmoSGSN-A m3ua
! asp asp-clnt-OsmoSGSN-A
! routing-key 3 0.23.4
--
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/33385
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Change-Id: I7b3adfa131a9dbb867b9ae68615da27191b021e5
Gerrit-Change-Number: 33385
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newchange
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-iuh/+/33315 )
Change subject: hnb-test.c: Update to libosmocore osmo_auth_gen_vec2
......................................................................
hnb-test.c: Update to libosmocore osmo_auth_gen_vec2
libosmogsm has recently deprecated the use of osmo_auth_gen_vec
and the osmo_sub_auth_data structure in favor of newer versions
of this API. Let's migrate to it
Change-Id: I8646caf14783833c4ebea041339c3056e4ac2dea
Depends: libosmocore.git Ie775fedba4a3fa12314c0f7c8a369662ef6a40df
---
M TODO-RELEASE
M tests/hnb-test.c
2 files changed, 17 insertions(+), 2 deletions(-)
Approvals:
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/TODO-RELEASE b/TODO-RELEASE
index d0852fc..2341398 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -7,3 +7,4 @@
# If any interfaces have been added since the last public release: c:r:a + 1.
# If any interfaces have been removed or changed since the last public release: c:r:0.
#library what description / commit summary line
+libosmogsm update version dependency depend on libosmogsm >= 1.8.0
diff --git a/tests/hnb-test.c b/tests/hnb-test.c
index de75186..bfccf5a 100644
--- a/tests/hnb-test.c
+++ b/tests/hnb-test.c
@@ -340,7 +340,7 @@
/* Generate SRES from *HARDCODED* Ki for Iuh testing */
struct osmo_auth_vector vec;
/* Ki 000102030405060708090a0b0c0d0e0f */
- struct osmo_sub_auth_data auth = {
+ struct osmo_sub_auth_data2 auth = {
.type = OSMO_AUTH_TYPE_GSM,
.algo = OSMO_AUTH_ALG_COMP128v1,
.u.gsm.ki = {
@@ -351,7 +351,7 @@
};
memset(&vec, 0, sizeof(vec));
- osmo_auth_gen_vec(&vec, &auth, ar->rand);
+ osmo_auth_gen_vec2(&vec, &auth, ar->rand);
printf("seq %d rand %s",
seq, osmo_hexdump(ar->rand, sizeof(ar->rand)));
--
To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/33315
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: I8646caf14783833c4ebea041339c3056e4ac2dea
Gerrit-Change-Number: 33315
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: pespin, daniel.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/33335 )
Change subject: Set stream_cli/srv name to contain ASP + sockname
......................................................................
Patch Set 9: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/33335
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I05bc5f6c7795f62c1814c1c774287b41ee85a475
Gerrit-Change-Number: 33335
Gerrit-PatchSet: 9
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 21 Jun 2023 11:11:20 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/33378 )
Change subject: Use new libosmo-sccp APIs osmo_ss7_asp_get_{name,proto}()
......................................................................
Use new libosmo-sccp APIs osmo_ss7_asp_get_{name,proto}()
Depends: libosmo-sccp.git Change-Id If9acfca1abc9ab7eb6d2388f548d7ee577b9c5ac
Change-Id: I0479f7bfb8337a6a955ba66c7b403db3565659d6
---
M TODO-RELEASE
M src/osmo-bsc/bsc_ctrl.c
M src/osmo-bsc/osmo_bsc_mgcp.c
M src/osmo-bsc/osmo_bsc_sigtran.c
4 files changed, 18 insertions(+), 6 deletions(-)
Approvals:
laforge: Looks good to me, approved
osmith: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/TODO-RELEASE b/TODO-RELEASE
index 4699dbd..2efa641 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -12,6 +12,6 @@
osmo-bsc CTRL,VTY osmo_fsm instance IDs now use new dynamic timeslot names 'DYNAMIC_OSMOCOM' and 'DYNAMIC_IPACCESS'
libosmogsm >1.8.0 circuit switched data stuff (gsm0808_enc/dec_channel_type etc.)
libosmo-abis >1.4.0 osmo_ortp.h: add RTP_PT_CSDATA
-libosmo-sccp >1.7.0 osmo_sccp_{get,set}_priv()
+libosmo-sccp >1.7.0 osmo_sccp_{get,set}_priv(), osmo_ss7_asp_get_name(), osmo_ss7_asp_get_proto()
libosmocore >1.8.0 GSM48_IE_CIP_MODE_SET_HO and GSM48_IE_SYNC_IND_HO
libosmo-mgcp-client > 1.11.0 mgcp_client_pool_empty(), mgcp_client_conf_alloc()
\ No newline at end of file
diff --git a/src/osmo-bsc/bsc_ctrl.c b/src/osmo-bsc/bsc_ctrl.c
index 2df7aa3..38698e7 100644
--- a/src/osmo-bsc/bsc_ctrl.c
+++ b/src/osmo-bsc/bsc_ctrl.c
@@ -686,7 +686,7 @@
struct msgb *msg;
/* don't attempt to send CTRL on a non-SCCPlite ASP */
- if (asp->cfg.proto != OSMO_SS7_ASP_PROT_IPA)
+ if (osmo_ss7_asp_get_proto(asp) != OSMO_SS7_ASP_PROT_IPA)
return 0;
msg = ctrl_cmd_make(cmd);
diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c
index 90a73e5..1b8e089 100644
--- a/src/osmo-bsc/osmo_bsc_mgcp.c
+++ b/src/osmo-bsc/osmo_bsc_mgcp.c
@@ -33,13 +33,14 @@
static struct bsc_msc_data *msc_from_asp(struct osmo_ss7_asp *asp)
{
int msc_nr;
+ const char *asp_name = osmo_ss7_asp_get_name(asp);
/* this is rather ugly, as we of course have MTP-level routing between
* the local SCCP user (BSC) and the AS/ASPs. However, for the most simple
* SCCPlite case, there is a 1:1 mapping between ASP and AS, and using
* the libosmo-sigtran "simple client", the names are "as[p]-clnt-msc-%u",
* as set in osmo_bsc_sigtran_init() */
- if (sscanf(asp->cfg.name, "asp-clnt-msc-%u", &msc_nr) != 1) {
- LOGP(DMSC, LOGL_ERROR, "Cannot find to which MSC the ASP %s belongs\n", asp->cfg.name);
+ if (!asp_name || sscanf(asp_name, "asp-clnt-msc-%u", &msc_nr) != 1) {
+ LOGP(DMSC, LOGL_ERROR, "Cannot find to which MSC the ASP '%s' belongs\n", asp_name);
return NULL;
}
return osmo_msc_data_find(bsc_gsmnet, msc_nr);
@@ -51,7 +52,8 @@
struct bsc_msc_data *msc;
int rc;
- LOGP(DMSC, LOGL_NOTICE, "%s: Received IPA-encapsulated MGCP: %s\n", asp->cfg.name, msg->l2h);
+ LOGP(DMSC, LOGL_NOTICE, "%s: Received IPA-encapsulated MGCP: %s\n",
+ osmo_ss7_asp_get_name(asp), msg->l2h);
msc = msc_from_asp(asp);
if (msc) {
/* we don't have a write queue here as we simply expect the socket buffers
diff --git a/src/osmo-bsc/osmo_bsc_sigtran.c b/src/osmo-bsc/osmo_bsc_sigtran.c
index 64bddf6..a4d0f2d 100644
--- a/src/osmo-bsc/osmo_bsc_sigtran.c
+++ b/src/osmo-bsc/osmo_bsc_sigtran.c
@@ -729,7 +729,7 @@
struct ipaccess_head *iph;
struct ipaccess_head_ext *iph_ext;
- if (asp->cfg.proto != OSMO_SS7_ASP_PROT_IPA) {
+ if (osmo_ss7_asp_get_proto(asp) != OSMO_SS7_ASP_PROT_IPA) {
msgb_free(msg);
return 0;
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/33378
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I0479f7bfb8337a6a955ba66c7b403db3565659d6
Gerrit-Change-Number: 33378
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: merged