pespin has uploaded this change for review.

View Change

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 change 36247. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: osmo-hnodeb
Gerrit-Branch: master
Gerrit-Change-Id: I51aa449e7fd5b1049fcaaeef3f1378423a838c05
Gerrit-Change-Number: 36247
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin@sysmocom.de>
Gerrit-MessageType: newchange