neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/31326 )
Change subject: Deprecate 'sccp cr max-payload-len', remove SCCP CR limit code
......................................................................
Patch Set 2:
(1 comment)
This change is ready for review.
Patchset:
PS2:
I figured it out, see 'Depends:' in commit log
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/31326
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I18dece84b33bbefce8617fbb0b2d79a7e5adb263
Gerrit-Change-Number: 31326
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Wed, 15 Feb 2023 02:37:05 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31327 )
Change subject: hnbgw: initial_ue_empty_cr: use larger payload to trigger empty SCCP CR
......................................................................
hnbgw: initial_ue_empty_cr: use larger payload to trigger empty SCCP CR
osmo-hnbgw will deprecate the 'sccp cr max-payload-len' config option.
To still trigger the 130 byte limit that is now enforced in
libosmo-sigtran, enlarge the NAS PDU.
So far the limit set via VTY was 0 bytes, which will no longer happen in
osmo-hnbgw after I18dece84b33bbefce8617fbb0b2d79a7e5adb263.
Related: OS#5906 SYS#5968
Change-Id: I174b2ce06a31daa5a129c8a39099fe8962092df8
---
M hnbgw/HNBGW_Tests.ttcn
1 file changed, 9 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/27/31327/1
diff --git a/hnbgw/HNBGW_Tests.ttcn b/hnbgw/HNBGW_Tests.ttcn
index eb7fad0..2aa6407 100644
--- a/hnbgw/HNBGW_Tests.ttcn
+++ b/hnbgw/HNBGW_Tests.ttcn
@@ -612,7 +612,15 @@
sAC := int2oct(pars.hnb.sac, 2),
iE_Extensions := omit
}
- var octetstring nas := f_rnd_octstring(10);
+ var octetstring nas;
+ if (pars.separate_sccp_cr) {
+ /* SCCP CR has a payload length limit of 130 bytes. To trigger this limit, the RANAP + NAS PDU has to be
+ * > 130 bytes. It doesn't need to be 131 bytes in the NAS PDU alone, but let's just make it definitely
+ * large enough. */
+ nas := f_rnd_octstring(131);
+ } else {
+ nas := f_rnd_octstring(10);
+ }
var IuSignallingConnectionIdentifier sigc_id := int2bit(f_rnd_int(1000), 24);
var GlobalRNC_ID grnc_id := {
pLMNidentity := lai.pLMNidentity,
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31327
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: I174b2ce06a31daa5a129c8a39099fe8962092df8
Gerrit-Change-Number: 31327
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: newchange
neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/31293 )
Change subject: UE state leak: when HNB re-registers, discard previous UE state
......................................................................
UE state leak: when HNB re-registers, discard previous UE state
User reports show leaked UE contexts over time, in a scenario where HNB
regularly disconnect and reconnect.
So far, when we receive a HNB REGISTER REQ, we log as "duplicated" and
continue to use the hnb_context unchanged. But it seems obvious that a
HNB that registers does not expect any UE state to remain. It will
obviously not tear down UE contexts (HNBAP or RUA) that have been
established before the HNB REGISTER REQUEST. These hence remain in
osmo-hnbgw indefinitely.
When receiving a HNB REGISTER REQUEST, release all its previous UE
state. Allow the HNB to register with a clean slate.
The aim is to alleviate the observed build-up of apparently orphaned UE
contexts, in order to avoid gradual memory exhaustion.
Related: SYS#6297
Change-Id: I7fa8a04cc3b2dfba263bda5b410961c77fbed332
---
M include/osmocom/hnbgw/hnbgw.h
M src/osmo-hnbgw/hnbgw.c
M src/osmo-hnbgw/hnbgw_hnbap.c
3 files changed, 21 insertions(+), 7 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
fixeria: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
diff --git a/include/osmocom/hnbgw/hnbgw.h b/include/osmocom/hnbgw/hnbgw.h
index 8adefea..ed18ca4 100644
--- a/include/osmocom/hnbgw/hnbgw.h
+++ b/include/osmocom/hnbgw/hnbgw.h
@@ -188,6 +188,7 @@
struct hnb_context *hnb_context_alloc(struct hnb_gw *gw, struct osmo_stream_srv_link *link, int new_fd);
void hnb_context_release(struct hnb_context *ctx);
+void hnb_context_release_ue_state(struct hnb_context *ctx);
void hnbgw_vty_init(struct hnb_gw *gw, void *tall_ctx);
int hnbgw_vty_go_parent(struct vty *vty);
diff --git a/src/osmo-hnbgw/hnbgw.c b/src/osmo-hnbgw/hnbgw.c
index 5dba1e3..3a6879e 100644
--- a/src/osmo-hnbgw/hnbgw.c
+++ b/src/osmo-hnbgw/hnbgw.c
@@ -395,15 +395,10 @@
return umts_cell_id_name(&ctx->id);
}
-void hnb_context_release(struct hnb_context *ctx)
+void hnb_context_release_ue_state(struct hnb_context *ctx)
{
struct hnbgw_context_map *map, *map2;
- LOGHNB(ctx, DMAIN, LOGL_INFO, "Releasing HNB context\n");
-
- /* remove from the list of HNB contexts */
- llist_del(&ctx->list);
-
/* deactivate all context maps */
llist_for_each_entry_safe(map, map2, &ctx->map_list, hnb_list) {
/* remove it from list, as HNB context will soon be
@@ -414,6 +409,16 @@
context_map_deactivate(map);
}
ue_context_free_by_hnb(ctx->gw, ctx);
+}
+
+void hnb_context_release(struct hnb_context *ctx)
+{
+ LOGHNB(ctx, DMAIN, LOGL_INFO, "Releasing HNB context\n");
+
+ /* remove from the list of HNB contexts */
+ llist_del(&ctx->list);
+
+ hnb_context_release_ue_state(ctx);
if (ctx->conn) { /* we own a conn, we must free it: */
LOGHNB(ctx, DMAIN, LOGL_INFO, "Closing HNB SCTP connection %s\n",
diff --git a/src/osmo-hnbgw/hnbgw_hnbap.c b/src/osmo-hnbgw/hnbgw_hnbap.c
index 4aefe2b..19ebd38 100644
--- a/src/osmo-hnbgw/hnbgw_hnbap.c
+++ b/src/osmo-hnbgw/hnbgw_hnbap.c
@@ -467,7 +467,15 @@
LOGHNB(ctx, DHNBAP, LOGL_DEBUG, "HNB-REGISTER-REQ %s MCC=%u,MNC=%u,LAC=%u,RAC=%u,SAC=%u,CID=%u from %s%s\n",
ctx->identity_info, ctx->id.mcc, ctx->id.mnc, ctx->id.lac, ctx->id.rac, ctx->id.sac, ctx->id.cid,
- name, ctx->hnb_registered ? " (duplicated)" : "");
+ name, ctx->hnb_registered ? " (re-connecting)" : "");
+
+ if (ctx->hnb_registered) {
+ /* The HNB is already registered, and we are seeing a new HNB Register Request. The HNB has restarted
+ * without us noticing. Clearly, the HNB does not expect any UE state to be active here, so discard any
+ * UE contexts and SCCP connections associated with this HNB. */
+ LOGHNB(ctx, DHNBAP, LOGL_NOTICE, "HNB reconnecting, discarding all previous UE state\n");
+ hnb_context_release_ue_state(ctx);
+ }
ctx->hnb_registered = true;
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/31293
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I7fa8a04cc3b2dfba263bda5b410961c77fbed332
Gerrit-Change-Number: 31293
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: jolly.
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/31296 )
Change subject: Reworked mi_e1_line_update() and some of its sub routines
......................................................................
Patch Set 3:
(1 comment)
Commit Message:
https://gerrit.osmocom.org/c/libosmo-abis/+/31296/comment/03ab1ac9_5b70e650
PS3, Line 7: Reworked mi_e1_line_update() and some of its sub routines
(btw, it is a good practice to write commit logs in "imperative form", shortest and most clear. No need to change this, maybe for future logs...
https://git.kernel.org/pub/scm/git/git.git/tree/Documentation/SubmittingPat…https://initialcommit.com/blog/Git-Commit-Message-Imperative-Mood
)
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/31296
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: Iab0776fce6921661b39e9e53376cf01a80bcd42c
Gerrit-Change-Number: 31296
Gerrit-PatchSet: 3
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Comment-Date: Tue, 14 Feb 2023 21:13:09 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: jolly.
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/31296 )
Change subject: Reworked mi_e1_line_update() and some of its sub routines
......................................................................
Patch Set 3: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/31296
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: Iab0776fce6921661b39e9e53376cf01a80bcd42c
Gerrit-Change-Number: 31296
Gerrit-PatchSet: 3
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Comment-Date: Tue, 14 Feb 2023 21:04:32 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment