pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hnodeb/+/36247?usp=email )
Change subject: Free UE contexts when starting shutdown procedure
......................................................................
Free UE contexts when starting shutdown procedure
They are not valid anymore since the Iuh conn is closed.
If kept alive, then if GTP/RTP traffic comes from CN while shutting down
the payloads may be forwarded to LLSK which may have been closed (eg.
because shutdown procedure was started precisely due to death LLSK
because other end closed it).
Related: OS#6826
Change-Id: I51aa449e7fd5b1049fcaaeef3f1378423a838c05
---
M src/osmo-hnodeb/hnb_shutdown_fsm.c
1 file changed, 23 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnodeb refs/changes/47/36247/1
diff --git a/src/osmo-hnodeb/hnb_shutdown_fsm.c b/src/osmo-hnodeb/hnb_shutdown_fsm.c
index 9d7e186..c97a124 100644
--- a/src/osmo-hnodeb/hnb_shutdown_fsm.c
+++ b/src/osmo-hnodeb/hnb_shutdown_fsm.c
@@ -45,12 +45,18 @@
static void st_none(struct osmo_fsm_inst *fi, uint32_t event, void *data)
{
struct hnb *hnb = (struct hnb *)fi->priv;
+ struct hnb_ue *ue, *ue_tmp;
+
switch (event) {
case HNB_SHUTDOWN_EV_START:
/* TODO: here we may want to communicate to lower layers over UDsocket that we are shutting down...
* TODO: Also, if Iuh link is still up, maybe send a Hnb deregister req towards HNBGW
- * TODO: also signal the hnb object somehow that we are starting to shut down?
*/
+
+ /* Drop active UE contexts, together with their GTP/AUDIO sessions: */
+ llist_for_each_entry_safe(ue, ue_tmp, &hnb->ue_list, list)
+ hnb_ue_free(ue);
+
if (osmo_stream_cli_is_connected(hnb->iuh.client))
osmo_stream_cli_close(hnb->iuh.client);
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnodeb/+/36247?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnodeb
Gerrit-Branch: master
Gerrit-Change-Id: I51aa449e7fd5b1049fcaaeef3f1378423a838c05
Gerrit-Change-Number: 36247
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: laforge.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/36242?usp=email )
Change subject: socket: Add remote PID and local FD to AF_UNIX sockname
......................................................................
Patch Set 2:
(1 comment)
File src/core/socket.c:
https://gerrit.osmocom.org/c/libosmocore/+/36242/comment/129fd1c5_4916b719
PS1, Line 2195: unsigned long long remote_pid;
: bool have_remote_pid;
: #if defined(SO_PEERCRED)
: struct ucred ucred;
: len = sizeof(struct ucred);
> indent level looks wrong at least here in gerrit?
Done
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/36242?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ic465e557ea49de8e044d1ef6d91fc3c852c88ff2
Gerrit-Change-Number: 36242
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Tue, 12 Mar 2024 17:50:38 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: comment
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36235?usp=email )
Change subject: hnodeb: Make HNBGW_ConnHdlr component alive
......................................................................
hnodeb: Make HNBGW_ConnHdlr component alive
The several components started by HNBGW_ConnHdlr are already marked as
"alive", but not HNBGW_ConnHdlr. As a result, during test tear down, if
eg. Iuh socket receives a message, it may try to send it to the
HNBGW_ConnHdlr component and will error because it was already killed.
Change-Id: Ibc2587db4563d016841d11de628057bffe36b581
---
M hnodeb/HNB_Tests.ttcn
1 file changed, 15 insertions(+), 1 deletion(-)
Approvals:
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/hnodeb/HNB_Tests.ttcn b/hnodeb/HNB_Tests.ttcn
index 1178695..29f0bbb 100644
--- a/hnodeb/HNB_Tests.ttcn
+++ b/hnodeb/HNB_Tests.ttcn
@@ -149,7 +149,7 @@
runs on test_CT return HNBGW_ConnHdlr {
var charstring id := testcasename();
var HNBGW_ConnHdlr vc_conn;
- vc_conn := HNBGW_ConnHdlr.create(id);
+ vc_conn := HNBGW_ConnHdlr.create(id) alive;
f_connect_handler(vc_conn, pars);
return vc_conn;
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36235?usp=email
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: Ibc2587db4563d016841d11de628057bffe36b581
Gerrit-Change-Number: 36235
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: merged
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/36244?usp=email )
Change subject: osmo_stream_cli_send(): Drop data if client is not connected [yet]
......................................................................
osmo_stream_cli_send(): Drop data if client is not connected [yet]
The behaviour is undefined on what should happen if a stream client user
is trying to write data before the client socket is connected. In
osmo_io mode we would actually crash due to a NULL-pointer dereference.
Let's discard any sent data in this situation and print a related error log message.
This problem actually shows up with osmo-bsc Change-Id
Icce412e6ee69366c7b131c9bc1d51e8d44204917 where we convert CBSP over to
osmo_io - here in situations where a CBSP client (using stream_cli) was
previously connected but has lost its connection.
Change-Id: I18d2e8e850c23a32f5983a715fa8a18747b296cd
---
M src/stream_cli.c
1 file changed, 28 insertions(+), 0 deletions(-)
Approvals:
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/stream_cli.c b/src/stream_cli.c
index 8312faf..2f5339c 100644
--- a/src/stream_cli.c
+++ b/src/stream_cli.c
@@ -1003,12 +1003,20 @@
OSMO_ASSERT(cli);
OSMO_ASSERT(msg);
+ if (!osmo_stream_cli_is_connected(cli)) {
+ LOGSCLI(cli, LOGL_ERROR, "send: not connected, dropping data!\n");
+ msgb_free(msg);
+ return;
+ }
+
switch (cli->mode) {
case OSMO_STREAM_MODE_OSMO_FD:
msgb_enqueue(&cli->tx_queue, msg);
osmo_fd_write_enable(&cli->ofd);
break;
case OSMO_STREAM_MODE_OSMO_IO:
+ /* whenever osmo_stream_cli_is_connected() [see above check], we should have an iofd */
+ OSMO_ASSERT(cli->iofd);
if (cli->proto == IPPROTO_SCTP)
rc = stream_iofd_sctp_send_msgb(cli->iofd, msg, MSG_NOSIGNAL);
else
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/36244?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I18d2e8e850c23a32f5983a715fa8a18747b296cd
Gerrit-Change-Number: 36244
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: jolly, pespin.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/36244?usp=email )
Change subject: osmo_stream_cli_send(): Drop data if client is not connected [yet]
......................................................................
Patch Set 2: Code-Review+2
(1 comment)
Patchset:
PS2:
merging this to resolve test regressions in ttcn3-bsc-test
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/36244?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I18d2e8e850c23a32f5983a715fa8a18747b296cd
Gerrit-Change-Number: 36244
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 12 Mar 2024 17:36:00 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/36222?usp=email )
Change subject: osmo_prim_srv_send: assert prim_srv is not NULL
......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS2:
> merging this to fix test regressions.
nevermind, that was the wrong patch. sorry for that ;)
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/36222?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I1122a1de2c29ee46cce22cec907576719e9c3721
Gerrit-Change-Number: 36222
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-Comment-Date: Tue, 12 Mar 2024 17:34:46 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: comment