fixeria has submitted this change. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/38141?usp=email )
Change subject: s1ap_proxy: fix E-RAB FSM lookup for RELEASE related IEs
......................................................................
s1ap_proxy: fix E-RAB FSM lookup for RELEASE related IEs
We use a tuple of {MmeUeId, EnbUeId, RABId} to register and lookup
E-RAB FSMs in the registry. Using RABId alone is wrong (because
it's not a globally unique ID) and will never yield anything.
Because of this bug the E-RAB FSMs were never terminated properly.
This was found thanks to the ttcn3-s1gw-test and remained unnoticed
so far because in test_e_rab_release() we still have this TODO:
%% TODO: make sure that the E-RAB FSM has been terminated
We'll need to add some E-RAB introspection API to implement this.
Change-Id: Ic737e7b0c08562ecfd641ce4e3c2f27c26f8560e
Fixes: 935a0f02 "{sctp,s1ap}_proxy: employ E-RAB FSMs"
---
M src/s1ap_proxy.erl
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Jenkins Builder: Verified
osmith: Looks good to me, approved
laforge: Looks good to me, but someone else must approve
diff --git a/src/s1ap_proxy.erl b/src/s1ap_proxy.erl
index f28ff56..1df1518 100644
--- a/src/s1ap_proxy.erl
+++ b/src/s1ap_proxy.erl
@@ -269,7 +269,7 @@
value = Content}, S) ->
%% poke E-RAB FSM
#'E-RABItem'{'e-RAB-ID' = ERABId} = Content,
- case dict:find(ERABId, S#proxy_state.erabs) of
+ case erab_fsm_find(ERABId, S) of
{ok, Pid} ->
ok = erab_fsm:erab_release_req(Pid);
error ->
@@ -287,7 +287,7 @@
value = Content}, S) ->
%% poke E-RAB FSM
#'E-RABReleaseItemBearerRelComp'{'e-RAB-ID' = ERABId} = Content,
- case dict:find(ERABId, S#proxy_state.erabs) of
+ case erab_fsm_find(ERABId, S) of
{ok, Pid} ->
ok = erab_fsm:erab_release_rsp(Pid);
error ->
--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/38141?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: erlang/osmo-s1gw
Gerrit-Branch: master
Gerrit-Change-Id: Ic737e7b0c08562ecfd641ce4e3c2f27c26f8560e
Gerrit-Change-Number: 38141
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(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>
Attention is currently required from: fixeria, laforge.
falconia has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/libosmo-abis/+/38138?usp=email )
Change subject: trau2rtp FR & EFR: fix uninitialized memory bug
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
> Alternatively, we may clarify the API docs and state that it's responsibility of the caller to [zero-]initialize the output buffer.
I really don't like this idea. It is nothing but a weird quirk of the particular code implementation used for FRv1 and EFR (but not for HRv1 or CSD) in that the code only sets bits to 1 but doesn't directly set them to 0. Clean interfaces between components (APIs) should be based on the good abstract design, not retro-defined around oddball quirks of a particular legacy code implementation. I struggle to think of any widely known API where the result of a function is wrong unless the caller presets the output buffer to some particular value or byte pattern.
You should also note that the unit test in the following patch fails unless the present patch is applied - that's how I caught this bug in the first place.
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/38138?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I6e6693e096b920a973c8cc627e94884099d004b5
Gerrit-Change-Number: 38138
Gerrit-PatchSet: 1
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 16 Sep 2024 06:24:51 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Attention is currently required from: pespin.
fixeria has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-bsc/+/38127?usp=email )
Change subject: Introduce hashtable to lookup bts by <LAC,CI>
......................................................................
Patch Set 2:
(1 comment)
File include/osmocom/bsc/gsm_data.h:
https://gerrit.osmocom.org/c/osmo-bsc/+/38127/comment/5188094f_02e11e0c?usp… :
PS2, Line 993: #define LAC_CI_HASHTABLE_KEY(lac, ci) ((((uint32_t)(ci)) << sizeof(lac)) | (uint32_t)(lac))
> I'm sorry I'm not following you here. […]
I mean, please remove a tab before the `#define ...` (shift to the left).
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/38127?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I47db6c7543e5c6c3b8f0de3ae5ee1b53c2b5f16f
Gerrit-Change-Number: 38127
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 16 Sep 2024 06:01:24 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Attention is currently required from: pespin.
fixeria has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-bsc/+/38087?usp=email )
Change subject: Introduce hashtable to lookup bts by LAC
......................................................................
Patch Set 4:
(2 comments)
File src/osmo-bsc/bts_vty.c:
https://gerrit.osmocom.org/c/osmo-bsc/+/38087/comment/57573871_0c10b968?usp… :
PS4, Line 281: default
> Uh? I think it's clear it's the default value for this config? we already use this notation in some […]
I know about this notation in the VTY. I am wondering how could it be default if we do not permit setting these values (see the check below)? Not directly related to this patch, but I find this confusing.
Did some testing by starting osmo-bsc with a config file that contains no `location_area_code` parameter. OsmoBSC indeed started fine and prints `location_area_code 0x0000` in the VTY. If I store this config by issuing `write file` and start osmo-bsc with the generated file, I am getting:
```
Error occurred during reading the below line:
location_area_code 0x0000
% LAC 0 is reserved by GSM 04.08
DNM FATAL Failed to parse the config file: 'doc/examples/osmo-bsc/osmo-bsc-minimal.cfg' (Invalid argument) (osmo_bsc_main.c:521)
Bootstrapping the network failed. exiting.
```
https://gerrit.osmocom.org/c/osmo-bsc/+/38087/comment/3df0ae91_7f00c368?usp… :
PS4, Line 289: if (lac == GSM_LAC_RESERVED_DETACHED || lac == GSM_LAC_RESERVED_ALL_BTS)
(this is the check I am talking about)
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/38087?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Id523027b49e0f58cd2c8c9b4dee619de415dbd15
Gerrit-Change-Number: 38087
Gerrit-PatchSet: 4
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 16 Sep 2024 05:57:20 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Attention is currently required from: fixeria.
pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-bsc/+/38127?usp=email )
Change subject: Introduce hashtable to lookup bts by <LAC,CI>
......................................................................
Patch Set 2:
(1 comment)
File include/osmocom/bsc/gsm_data.h:
https://gerrit.osmocom.org/c/osmo-bsc/+/38127/comment/d019a9d9_33e4dbc8?usp… :
PS2, Line 993: #define LAC_CI_HASHTABLE_KEY(lac, ci) ((((uint32_t)(ci)) << sizeof(lac)) | (uint32_t)(lac))
> cosmetic: << to the left, otherwise it looks like another field in this struct. […]
I'm sorry I'm not following you here. What do you mean?
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/38127?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I47db6c7543e5c6c3b8f0de3ae5ee1b53c2b5f16f
Gerrit-Change-Number: 38127
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Sun, 15 Sep 2024 22:09:05 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>