pespin has uploaded this change for review. ( 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(::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
"""
Change-Id: I05bc5f6c7795f62c1814c1c774287b41ee85a475
---
M src/osmo_ss7.c
1 file changed, 35 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/35/33335/1
diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c
index f5db687..128545d 100644
--- a/src/osmo_ss7.c
+++ b/src/osmo_ss7.c
@@ -1838,6 +1838,10 @@
talloc_free(asp->sock_name);
asp->sock_name = osmo_sock_get_name(asp, ofd->fd);
+ char *cli_name = talloc_asprintf(asp, "%s,%s", asp->cfg.name, asp->sock_name);
+ osmo_stream_cli_set_name(asp->client, cli_name);
+ talloc_free(cli_name);
+
LOGPASP(asp, DLSS7, LOGL_INFO, "Client connected %s\n", asp->sock_name);
if (asp->lm && asp->lm->prim_cb) {
@@ -2089,9 +2093,15 @@
* 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);
+
+ char *srv_name = talloc_asprintf(asp, "%s,%s", asp->cfg.name, asp->sock_name);
+ osmo_stream_srv_set_name(asp->server, srv_name);
+ talloc_free(srv_name);
+
/* make sure the conn_cb() is called with the asp as private
* data */
osmo_stream_srv_set_data(srv, asp);
--
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: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/33334 )
Change subject: Set ASP name on related stream_cli
......................................................................
Set ASP name on related stream_cli
Since recently, libosmo-netif makes use of that name when printing.
Hence, let's use the already available osmo_stream_cli_set_name2() to
set a specific name (osmo_stream_cli_set_name() sets name="").
Change-Id: I1618da8c5b146729eeb32da3f882534b98144514
---
M src/osmo_ss7.c
1 file changed, 14 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/34/33334/1
diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c
index 3dc0d51..f5db687 100644
--- a/src/osmo_ss7.c
+++ b/src/osmo_ss7.c
@@ -1617,7 +1617,7 @@
asp->server = NULL;
}
if (!asp->client)
- asp->client = osmo_stream_cli_create(asp);
+ asp->client = osmo_stream_cli_create2(asp, asp->cfg.name);
if (!asp->client) {
LOGPASP(asp, DLSS7, LOGL_ERROR, "Unable to create stream"
" client for ASP %s\n", asp->cfg.name);
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/33334
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I1618da8c5b146729eeb32da3f882534b98144514
Gerrit-Change-Number: 33334
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33322 )
Change subject: mgw: Introduce test TC_auep_null
......................................................................
Patch Set 2: Verified+1
(1 comment)
Patchset:
PS2:
Hmm strange jenkins provided Verified+1 but it seems it did not end up storing this change... adding +1 myself now.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33322
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I9395cd526cf626974fb0e2ed93ff5d95a433d8c0
Gerrit-Change-Number: 33322
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 16 Jun 2023 10:13:42 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: laforge, daniel.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/33333 )
Change subject: socket: Ensure fd is not negative in osmo_sock_get_name_buf()
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/33333
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I76727993224ef87b475c33360c24966e82e866ec
Gerrit-Change-Number: 33333
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 16 Jun 2023 10:11:00 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: laforge, daniel.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/33332 )
Change subject: stream: Assert that fd is valid in stream_cli_handle_connecting()
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/33332
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: If0bed2bae556e0a8233e9e66e82c70a5c677fc3c
Gerrit-Change-Number: 33332
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 16 Jun 2023 10:10:37 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: neels, laforge.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/33171 )
Change subject: tweak lots of logging
......................................................................
Patch Set 7:
(2 comments)
File src/osmo-hnbgw/hnbgw_cn.c:
https://gerrit.osmocom.org/c/osmo-hnbgw/+/33171/comment/3543a991_7b1dee0e
PS3, Line 515: LOG_CNLINK(cnlink, DCN, LOGL_NOTICE, "using: cs7-%u %s <-> %s %s %s\n",
> I am not using multi line logging here ... ? […]
#define CNLINK_PRINT_FMT "cs7-%u %s <-> %s %s %s"
#define CNLINK_PRINT_ARGS(cnlink) ss7->cfg.id, \
osmo_ss7_pointcode_print(ss7, cnlink->hnbgw_sccp_user->local_addr.pc), \
osmo_ss7_pointcode_print2(ss7, cnlink->remote_addr.pc), \
cnlink->name, cnlink->use.remote_addr_name ? : "(default remote point-code)"
File src/osmo-hnbgw/hnbgw_cn.c:
https://gerrit.osmocom.org/c/osmo-hnbgw/+/33171/comment/3b6a289c_b8e52303
PS7, Line 635: hnbgw_cnlink_log_self(cnlink);
LOGP(DCN, LOGL_NOTICE, "Using " CNLINK_PRINT_FMT "\n", CNLINK_PRINT_ARGS(cnlink));
(or simply copy the entire log line if you are really expecting to use it twice).
Also, I'm note sure why cannot LOG_CNLINK or alike be used there instead. Maybe LOG_CNLINK should be extended with more info?
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/33171
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I41275d8c3e272177976a9302795884666c35cd06
Gerrit-Change-Number: 33171
Gerrit-PatchSet: 7
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Fri, 16 Jun 2023 10:08:27 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment