laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-e1-hardware/+/27316 )
Change subject: manual: Document the factory default jumper setting
......................................................................
manual: Document the factory default jumper setting
Also re-word/expand a bit on the situations in which NT mode
or cross-over is needed.
Change-Id: Ie726d4ca2e8605015a2f0384d2b435e1b40c1cad
---
M doc/manuals/chapters/hardware.adoc
1 file changed, 7 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-e1-hardware refs/changes/16/27316/1
diff --git a/doc/manuals/chapters/hardware.adoc b/doc/manuals/chapters/hardware.adoc
index 0e129c2..4a1de14 100644
--- a/doc/manuals/chapters/hardware.adoc
+++ b/doc/manuals/chapters/hardware.adoc
@@ -44,8 +44,13 @@
The pin-out of the connectors can be swapped between TE and NT mode using
the J4 and J5 jumper blocks on the circuit board.
-A GSM BTS typically implements TE pin-out, while the icE1usb should then
-use NT mode pin-out if no cross-over cable is used.
+The factory default setting of the jumpers is TE-mode.
+
+In case you're using the icE1usb with user-side equipment such as a GSM BTS,
+a PBX, a Router or the like which traditionally was attached to the public
+network, those devices all implement TE mode. In such situations you need
+to either switch the icE1usb to NT mode (and use straight wiring), or use
+an E1 cross-over cable.
.Pin-out of RJ45 E1 connectors
[options="header"]
--
To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/27316
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-e1-hardware
Gerrit-Branch: master
Gerrit-Change-Id: Ie726d4ca2e8605015a2f0384d2b435e1b40c1cad
Gerrit-Change-Number: 27316
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-e1-hardware/+/27315 )
Change subject: manual: fix link to gateware
......................................................................
manual: fix link to gateware
Change-Id: Iad107b33d182e3d9343dfb4e533360740e9c85df
---
M doc/manuals/chapters/firmware.adoc
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-e1-hardware refs/changes/15/27315/1
diff --git a/doc/manuals/chapters/firmware.adoc b/doc/manuals/chapters/firmware.adoc
index 5ae5fb1..5e4a11c 100644
--- a/doc/manuals/chapters/firmware.adoc
+++ b/doc/manuals/chapters/firmware.adoc
@@ -49,7 +49,7 @@
https://ftp.osmocom.org/binaries/icE1usb/firmware/latest/
The latest gateware can currently only be found at the personal developer
-directory of tnt at https://people.osmocom.org/tnt/e1/icE1usb-202010-bd399e96.bin
+directory of tnt at https://people.osmocom.org/tnt/ice1usb/icE1usb-202010-bd399e96.bin
A more official download location for the gateware will be provided shortly.
==== Upgrading the FPGA gateware
--
To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/27315
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-e1-hardware
Gerrit-Branch: master
Gerrit-Change-Id: Iad107b33d182e3d9343dfb4e533360740e9c85df
Gerrit-Change-Number: 27315
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange
Attention is currently required from: pespin, daniel.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27314 )
Change subject: ggsn: Support rx cause 'New PDP type due to network preference'
......................................................................
Patch Set 1:
(3 comments)
File ggsn_tests/GGSN_Tests.ttcn:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27314/comment/10623360_df5e…
PS1, Line 366: if (not match(cpr.endUserAddress, tr_EuaIPv4(?)) and
Let's make it shorter:
if (not match(cpr.endUserAddress, (tr_EuaIPv4(?), tr_EuaIPv6(?)))) { ... }
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27314/comment/e6a29ac2_6455…
PS1, Line 1704: cause_accept
Defined but not used, why?
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27314/comment/82e91bd1_a7ed…
PS1, Line 1705: var
const, here and the line below
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27314
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: Iace6a4bd0c2372601dc43108ec4eb78602dbcf30
Gerrit-Change-Number: 27314
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 23 Feb 2022 19:53:48 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: pespin.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27295 )
Change subject: pcu: Start PCUIF related components as alive-type
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27295
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: I17b2cfed2edbea7427e608380059bb1b422ca600
Gerrit-Change-Number: 27295
Gerrit-PatchSet: 1
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: Wed, 23 Feb 2022 18:52:23 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: pespin.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27294 )
Change subject: Start BSSGP_CT and NS_CT as alive-type component in all testsuites
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27294
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: I6e3b08710b4502e2b9805f7c9f7bd89f34e4085c
Gerrit-Change-Number: 27294
Gerrit-PatchSet: 1
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: Wed, 23 Feb 2022 18:44:22 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: pespin.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27293 )
Change subject: pcu: usse alive-type for NS and BSSGP created components
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27293
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: I369a5e2246204416c2f29a114bde6bc21f7eaf4f
Gerrit-Change-Number: 27293
Gerrit-PatchSet: 1
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: Wed, 23 Feb 2022 18:43:46 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: neels, pespin.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27311 )
Change subject: bsc: inter-BSC HO in: expect codecs in HO Request ACK
......................................................................
Patch Set 1:
(1 comment)
File bsc/BSC_Tests.ttcn:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27311/comment/f12ca40a_a8b0…
PS1, Line 6033: mtc.stop;
> Misc_Helpers.f_shutdown() would fit better here (also in other additions below).
Ack
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27311
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: Ib2b4e27be241e2a92c0c3bffdf906bf22c09352b
Gerrit-Change-Number: 27311
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 23 Feb 2022 18:41:34 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27314 )
Change subject: ggsn: Support rx cause 'New PDP type due to network preference'
......................................................................
ggsn: Support rx cause 'New PDP type due to network preference'
Related: OS#5449
Change-Id: Iace6a4bd0c2372601dc43108ec4eb78602dbcf30
---
M ggsn_tests/GGSN_Tests.ttcn
1 file changed, 75 insertions(+), 34 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/14/27314/1
diff --git a/ggsn_tests/GGSN_Tests.ttcn b/ggsn_tests/GGSN_Tests.ttcn
index bef7949..247e205 100644
--- a/ggsn_tests/GGSN_Tests.ttcn
+++ b/ggsn_tests/GGSN_Tests.ttcn
@@ -331,9 +331,15 @@
}
}
- function f_handle_create_req(inout PdpContext ctx, in Gtp1cUnitdata ud, in OCT1 exp_cause := '80'O) runs on GT_CT {
+ function f_handle_create_req(inout PdpContext ctx, in Gtp1cUnitdata ud, in template OCT1 exp_cause := '80'O) runs on GT_CT {
var CreatePDPContextResponse cpr := ud.gtpc.gtpc_pdu.createPDPContextResponse;
- if (exp_cause == '80'O and exp_cause == cpr.cause.causevalue) {
+
+ if (not match(cpr.cause.causevalue, exp_cause)) {
+ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,
+ "CreatePDPContextResp: cause expectancies didn't match");
+ }
+
+ if (cpr.cause.causevalue == '80'O) { /* Accepted */
/* Check if EUA type corresponds to requested type */
if (match(ctx.eua, t_EuaIPv4(?)) and
not match(cpr.endUserAddress, tr_EuaIPv4(?))){
@@ -350,34 +356,45 @@
Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,
"EUAv4v6 expectancies didn't match");
}
- /* Check if PCO response corresponds to request */
- if (ispresent(ctx.pco_req)) {
- if (match(ctx.pco_req, ts_PCO_IPv4_DNS_CONT) and
- not match(cpr.protConfigOptions, tr_PCO_IPv4_DNS_CONT_resp(?))) {
- Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,
- "IPv4 DNS Container requested, but missing");
- }
- if (match(ctx.pco_req, ts_PCO_IPv6_DNS) and
- not match(cpr.protConfigOptions, tr_PCO_IPv6_DNS_resp(?))) {
- Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,
- "IPv6 DNS Container requested, but missing");
- }
+ } else if (cpr.cause.causevalue == '81'O) { /* Cause: New PDP type due to network preference */
+ /* ETSI TS 129 060 7.3.2 Create PDP Context Response. OS#5449 */
+ /* This should only happen if EUA requested type is v4v6: */
+ if (not ischosen(ctx.eua.endUserAddress.endUserAddressIPv4andIPv6)) {
+ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,
+ "Cause not expected when requesting a non v4v6 EUA");
}
- ctx.teid_remote := cpr.teidDataI.teidDataI;
- ctx.teic_remote := cpr.teidControlPlane.teidControlPlane;
- ctx.eua := cpr.endUserAddress;
- ctx.pco_neg := cpr.protConfigOptions;
- setverdict(pass);
- } else if (exp_cause != '80'O and exp_cause == cpr.cause.causevalue) {
- if (ispresent(cpr.endUserAddress)) {
- log("EUA received on createPDPContextResponse cause=" & oct2str(cpr.cause.causevalue));
- setverdict(fail);
+ if (not match(cpr.endUserAddress, tr_EuaIPv4(?)) and
+ not match(cpr.endUserAddress, tr_EuaIPv6(?))) {
+ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,
+ "Cause not expected when requesting+receiving EUAv4v6");
}
- setverdict(pass);
} else {
- Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,
- "CreatePDPContextResp: cause expectancies didn't match");
+ if (ispresent(cpr.endUserAddress)) {
+ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,
+ "EUA received on createPDPContextResponse cause=" & oct2str(cpr.cause.causevalue));
+ }
+ setverdict(pass);
+ return;
}
+
+ /* Check if PCO response corresponds to request */
+ if (ispresent(ctx.pco_req)) {
+ if (match(ctx.pco_req, ts_PCO_IPv4_DNS_CONT) and
+ not match(cpr.protConfigOptions, tr_PCO_IPv4_DNS_CONT_resp(?))) {
+ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,
+ "IPv4 DNS Container requested, but missing");
+ }
+ if (match(ctx.pco_req, ts_PCO_IPv6_DNS) and
+ not match(cpr.protConfigOptions, tr_PCO_IPv6_DNS_resp(?))) {
+ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,
+ "IPv6 DNS Container requested, but missing");
+ }
+ }
+ ctx.teid_remote := cpr.teidDataI.teidDataI;
+ ctx.teic_remote := cpr.teidControlPlane.teidControlPlane;
+ ctx.eua := cpr.endUserAddress;
+ ctx.pco_neg := cpr.protConfigOptions;
+ setverdict(pass);
}
function f_handle_update_req(inout PdpContext ctx, in Gtp1cUnitdata ud, in OCT1 exp_cause := '80'O) runs on GT_CT {
@@ -420,8 +437,9 @@
}
/* send a PDP context activation */
- function f_pdp_ctx_act(inout PdpContext ctx, OCT1 exp_cause := '80'O) runs on GT_CT {
+ function f_pdp_ctx_act(inout PdpContext ctx, template OCT1 exp_cause := '80'O) runs on GT_CT return CreatePDPContextResponse {
var Gtp1cUnitdata ud;
+ var CreatePDPContextResponse cpr;
var default d;
log("sending CreatePDP");
@@ -436,10 +454,12 @@
alt {
[] GTPC.receive(tr_GTPC_MsgType(g_peer_c, createPDPContextResponse, ctx.teic)) -> value ud {
f_handle_create_req(ctx, ud, exp_cause);
+ cpr := ud.gtpc.gtpc_pdu.createPDPContextResponse;
}
}
deactivate(d);
T_default.stop;
+ return cpr;
}
function f_pdp_ctx_exp_del_req(PdpContext ctx, template (omit) OCT1 expect_cause := omit, boolean expect_teardown := false) runs on GT_CT {
@@ -1680,18 +1700,39 @@
/* Test IPv4v6 context activation for dynamic IPv4v6 EUA on a v4-only APN */
testcase TC_pdp46_act_deact_apn4() runs on GT_CT {
+ var CreatePDPContextResponse cpr;
+ var OCT1 cause_accept := '80'O; /* Normal accept cause */
+ var OCT1 cause_new_pdp_type := '81'O; /* Cause: New PDP type due to network preference */
+ var OCT1 cause_unknown_pdp := 'DC'O; /* Cause: Unknown PDP address or PDP type */
f_init();
- /* A typical MS first attempts v4v6, and if rejected, then tries v4 and v6 separetly */
var PdpContext ctx46 := valueof(t_DefinePDP(f_rnd_imsi('26242'H), '1234'O, c_ApnInternet, valueof(t_EuaIPv4Dynv6Dyn)));
- f_pdp_ctx_act(ctx46, 'DC'O); /* Cause: Unknown PDP address or PDP type */
+ cpr := f_pdp_ctx_act(ctx46, (cause_unknown_pdp, cause_new_pdp_type));
- var PdpContext ctx4 := valueof(t_DefinePDP(f_rnd_imsi('26242'H), '1234'O, c_ApnInternet, valueof(t_EuaIPv4Dyn)));
- f_pdp_ctx_act(ctx4, '80'O); /* Normal accept cause */
+ if (cpr.cause.causevalue == cause_new_pdp_type) {
+ /* 3GPP TS 23.060 sec 9.2.1: "If the MS requests PDP type IPv4v6,
+ * but the operator preferences dictate the use of a single IP
+ * version only, the PDP type shall be changed to a single address
+ * PDP type (IPv4 or IPv6) and a reason cause shall be returned to
+ * the MS indicating that only the assigned PDP type is allowed. In
+ * this case, the MS shall not request another PDP context for the
+ * other PDP type during the existence of the PDP context." */
+ f_pdp_ctx_del(ctx46, '1'B);
+ } else {
+ /* 3GPP TS 23.060 sec 9.2.1 NOTE 5: If the MS requests PDP type
+ * IPv4v6, and the PDP context is rejected due to "unknown PDP
+ * type", the MS can attempt to establish dual-stack connectivity
+ * by performing two PDP context request procedures to activate an
+ * IPv4 PDP context and an IPv6 PDP context, both to the same APN. A
+ * typical MS first attempts v4v6, and if rejected, then tries v4
+ * and v6 separetly */
+ var PdpContext ctx4 := valueof(t_DefinePDP(f_rnd_imsi('26242'H), '1234'O, c_ApnInternet, valueof(t_EuaIPv4Dyn)));
+ f_pdp_ctx_act(ctx4, '80'O); /* Normal accept cause */
- var PdpContext ctx6 := valueof(t_DefinePDP(f_rnd_imsi('26242'H), '1234'O, c_ApnInternet, valueof(t_EuaIPv6Dyn)));
- f_pdp_ctx_act(ctx6, 'DC'O); /* Cause: Unknown PDP address or PDP type */
+ var PdpContext ctx6 := valueof(t_DefinePDP(f_rnd_imsi('26242'H), '1234'O, c_ApnInternet, valueof(t_EuaIPv6Dyn)));
+ f_pdp_ctx_act(ctx6, 'DC'O); /* Cause: Unknown PDP address or PDP type */
- f_pdp_ctx_del(ctx4, '1'B);
+ f_pdp_ctx_del(ctx4, '1'B);
+ }
}
/* Validate if 2nd CtxCreateReq with increased Recovery IE causes ggsn to drop 1st one (while keeping 2nd one). */
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27314
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: Iace6a4bd0c2372601dc43108ec4eb78602dbcf30
Gerrit-Change-Number: 27314
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: osmith.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/27312 )
Change subject: mobile/subscriber.c: fix auth resp with test sim
......................................................................
Patch Set 2: Code-Review+2
(1 comment)
Patchset:
PS2:
Oh, so I broke the test card feature back in 2018... Thanks for fixing it!
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/27312
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I0ee910c171d383fb2cdcaf5eb54eafe18da3430b
Gerrit-Change-Number: 27312
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 23 Feb 2022 17:41:12 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: neels.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/27309 )
Change subject: inter-BSC HO in: add Speech Codec (Chosen) IE to HO Req Ack
......................................................................
Patch Set 1: Code-Review-1
(1 comment)
File src/osmo-bsc/osmo_bsc_bssap.c:
https://gerrit.osmocom.org/c/osmo-bsc/+/27309/comment/abea5aba_2f76e018
PS1, Line 1449: return HO_RESULT_ERROR
Everywhere in this function I see -ERRNO returned, but here you return a positive integer from 'enum handover_result'. Then in ho_fsm_wait_rr_ho_detect_onenter() we're calling strerror(-rc). The error message in this case may look really confusing, so I suggest to use -ERRNO here too.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/27309
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I1d0b395c97145b5aa1af4ef67aec9338d2f8f43b
Gerrit-Change-Number: 27309
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: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 23 Feb 2022 17:25:01 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: iedemam, laforge.
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/27081 )
Change subject: New stats for lchan life duration.
......................................................................
Patch Set 11:
(1 comment)
Patchset:
PS11:
the build failure looks rather weird, haven't seen such before. no idea what's going on there... usually we get a concise error message. maybe it's from a segfault or something??
can't look closer now, will see later.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/27081
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I1b0670c47cb5e0b7776eda89d1e71545ba0e3347
Gerrit-Change-Number: 27081
Gerrit-PatchSet: 11
Gerrit-Owner: iedemam <michael(a)kapsulate.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: iedemam <michael(a)kapsulate.com>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Wed, 23 Feb 2022 17:14:54 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: iedemam, laforge.
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/27081 )
Change subject: New stats for lchan life duration.
......................................................................
Patch Set 11:
(1 comment)
Patchset:
PS11:
> for a struct osmo_time_cc *foo, you can use foo->total_sum. […]
(...you could use a separate uint64_t last_total_sum, next to the osmo_time_cc, to work out the elapsed total_sum since last time you looked, if the total_sum is not sufficient)
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/27081
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I1b0670c47cb5e0b7776eda89d1e71545ba0e3347
Gerrit-Change-Number: 27081
Gerrit-PatchSet: 11
Gerrit-Owner: iedemam <michael(a)kapsulate.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: iedemam <michael(a)kapsulate.com>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Wed, 23 Feb 2022 17:12:32 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: iedemam <michael(a)kapsulate.com>
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: iedemam, laforge.
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/27081 )
Change subject: New stats for lchan life duration.
......................................................................
Patch Set 11:
(5 comments)
Patchset:
PS11:
> Hi all, […]
for a struct osmo_time_cc *foo, you can use foo->total_sum. It holds the total sum in microseconds (1e-6).
osmo_time_cc doesn't use rbtree, will have to look closer to identify the problem
PS11:
(just some comments, haven't fully reviewed yet)
File src/osmo-bsc/bts.c:
https://gerrit.osmocom.org/c/osmo-bsc/+/27081/comment/e851e96c_94ff084e
PS8, Line 1514: "Cummulative number of active milliseconds on TCH chans",
> Done
you're right, it's not the average indeed
File src/osmo-bsc/lchan_fsm.c:
https://gerrit.osmocom.org/c/osmo-bsc/+/27081/comment/ba625ea8_c9c082b3
PS8, Line 1810:
> This is a great bit of information. I do think it is important to capture the error timeouts. […]
another idea would be to have a separate accumulator for the release process (from established_onleave to unused_onenter). it should yield a fairly constant value in normal operation for all lchans. it would be easier to see chan release problems on a separate metric.
https://gerrit.osmocom.org/c/osmo-bsc/+/27081/comment/de81d689_797e7b5c
PS8, Line 1811: /* Add active milliseconds to cummulative counts per channel type */
> Adopted. […]
ack
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/27081
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I1b0670c47cb5e0b7776eda89d1e71545ba0e3347
Gerrit-Change-Number: 27081
Gerrit-PatchSet: 11
Gerrit-Owner: iedemam <michael(a)kapsulate.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: iedemam <michael(a)kapsulate.com>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Wed, 23 Feb 2022 17:08:47 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: iedemam <michael(a)kapsulate.com>
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: comment
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/27312 )
Change subject: mobile/subscriber.c: fix auth resp with test sim
......................................................................
Patch Set 1:
This change is ready for review.
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/27312
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I0ee910c171d383fb2cdcaf5eb54eafe18da3430b
Gerrit-Change-Number: 27312
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Wed, 23 Feb 2022 16:59:54 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: neels, dexter.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/27307 )
Change subject: BSSAP: HO Request Ack: add missing Codec List (BSS Supported)
......................................................................
Patch Set 2: Code-Review+2
(1 comment)
Patchset:
PS1:
> am I? that's what the more_items flag is for. […]
Ah sorry, the way gerrit showed me the diff I thought the mote_items field didn't exist before! my fault. It's fine. However still good to add a TODO-RELEASE entry since new fields are available (I have to take that into account when increasing the libversion stuff).
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/27307
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Iab0a7b4d81592157fc111d1adb9e9f4cb53a94e9
Gerrit-Change-Number: 27307
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 23 Feb 2022 16:58:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: pespin, dexter.
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/27307 )
Change subject: BSSAP: HO Request Ack: add missing Codec List (BSS Supported)
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
> Please update TODO-RELEASE, you are breaking the ABI here.
am I? that's what the more_items flag is for.
I can add to TODO-RELEASE that there is a new member in the struct,
but using the more_items boolean makes any version work with any other version.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/27307
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Iab0a7b4d81592157fc111d1adb9e9f4cb53a94e9
Gerrit-Change-Number: 27307
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 23 Feb 2022 16:52:17 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: neels.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27311 )
Change subject: bsc: inter-BSC HO in: expect codecs in HO Request ACK
......................................................................
Patch Set 1: Code-Review+1
(1 comment)
File bsc/BSC_Tests.ttcn:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27311/comment/c2d25a76_af51…
PS1, Line 6033: mtc.stop;
Misc_Helpers.f_shutdown() would fit better here (also in other additions below).
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27311
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: Ib2b4e27be241e2a92c0c3bffdf906bf22c09352b
Gerrit-Change-Number: 27311
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 23 Feb 2022 16:26:17 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: neels, laforge.
iedemam has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/27081 )
Change subject: New stats for lchan life duration.
......................................................................
Patch Set 11:
(2 comments)
Patchset:
PS11:
Hi all,
Here is my first stab at converting to use osmo_time_cc. It has only been tested minimally as I wanted some feedback on the approach first.
The previous timestamp+diff method is still used to see per lchan activation ages in the VTY and the new time_cc timekeeper to track and report cumulative milliseconds during channel use. Maybe a new API for osmo_time_cc to pull the elapsed time value could help? Then I would no longer need to use two sources of truth.
There is also a SEGV in here pretty regularly with the following backtrace. Probably a misuse on my part of osmo_time_cc. Just reporting for completeness.
```
Program received signal SIGSEGV, Segmentation fault.
rb_insert_color (node=node@entry=0x76bf60, root=0x7ffff7fe2828) at rbtree.c:77
77 rbtree.c: No such file or directory.
(gdb)
(gdb) bt
#0 rb_insert_color (node=node@entry=0x76bf60, root=0x7ffff7fe2828) at rbtree.c:77
#1 0x00007ffff72db95f in __add_timer (timer=0x76bf60) at timer.c:62
#2 osmo_timer_add (timer=timer@entry=0x76bf60) at timer.c:85
#3 0x00007ffff72db9b8 in osmo_timer_schedule (timer=0x76bf60, seconds=0, microseconds=0) at timer.c:107
#4 0x00007ffff72dbcf6 in osmo_timers_update () at timer.c:269
#5 0x00007ffff72dc7b5 in _osmo_select_main (polling=0) at select.c:394
#6 0x00007ffff72dc846 in osmo_select_main_ctx (polling=<optimized out>) at select.c:455
#7 0x000000000040dd55 in ?? ()
#8 0x00007ffff62cd391 in __libc_start_main () from /lib64/libc.so.6
#9 0x000000000040e7ca in ?? ()
```
File src/osmo-bsc/bts.c:
https://gerrit.osmocom.org/c/osmo-bsc/+/27081/comment/0c6222f9_b8425161
PS8, Line 1514: "Cummulative number of active milliseconds on TCH chans",
> sounds great
Done
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/27081
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I1b0670c47cb5e0b7776eda89d1e71545ba0e3347
Gerrit-Change-Number: 27081
Gerrit-PatchSet: 11
Gerrit-Owner: iedemam <michael(a)kapsulate.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Wed, 23 Feb 2022 16:06:53 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: iedemam <michael(a)kapsulate.com>
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: comment
Attention is currently required from: iedemam, neels.
Hello Jenkins Builder, neels,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-bsc/+/27081
to look at the new patch set (#11).
Change subject: New stats for lchan life duration.
......................................................................
New stats for lchan life duration.
This patch adds two stats which track cummulative lchan lifetime by
type TCH and SDCCH. These new counters will accomplish two things:
1) Provide a glanceable way to see if lchan durations look healthy. When
examining a site, short-lived (<5s) and long-lived (>30s) TCH lchans
are difficult to tell apart. If we only see short-lived TCH lchans,
there is most likely an RF or signaling problem to investigate. This
new counter will expose channel ages in the VTY output
2) Provide a more accurate count for Erlangs per site. Currently, we
are basing Erlangs on active TCH channel counts per stats period. This
method skews high very quickly. Each active TCH in that period
translates into the full 10s of activity. This counter should improve
accuracy by two orders of magnitude.
Change-Id: I1b0670c47cb5e0b7776eda89d1e71545ba0e3347
---
M include/osmocom/bsc/bts.h
M include/osmocom/bsc/gsm_data.h
M src/osmo-bsc/bts.c
M src/osmo-bsc/bts_trx_vty.c
M src/osmo-bsc/bts_vty.c
M src/osmo-bsc/gsm_data.c
M src/osmo-bsc/lchan_fsm.c
7 files changed, 93 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/81/27081/11
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/27081
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I1b0670c47cb5e0b7776eda89d1e71545ba0e3347
Gerrit-Change-Number: 27081
Gerrit-PatchSet: 11
Gerrit-Owner: iedemam <michael(a)kapsulate.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: iedemam <michael(a)kapsulate.com>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: neels.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/27310 )
Change subject: inter-BSC HO in: add Codec List (BSS Supported) IE to HO Req Ack
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/27310
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I3c0576505a3ceb3cd5cc31dc69c5bc4a86a4ea08
Gerrit-Change-Number: 27310
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 23 Feb 2022 15:35:36 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: neels.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/27309 )
Change subject: inter-BSC HO in: add Speech Codec (Chosen) IE to HO Req Ack
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/27309
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I1d0b395c97145b5aa1af4ef67aec9338d2f8f43b
Gerrit-Change-Number: 27309
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 23 Feb 2022 15:33:50 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: neels.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/27308 )
Change subject: inter-BSC HO in: add speech IEs only on speech mode lchans
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/27308
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I830654f419e6f0a196dc6d3e58422e00b324af9e
Gerrit-Change-Number: 27308
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 23 Feb 2022 15:33:03 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/27307 )
Change subject: BSSAP: HO Request Ack: add missing Codec List (BSS Supported)
......................................................................
BSSAP: HO Request Ack: add missing Codec List (BSS Supported)
Change-Id: Iab0a7b4d81592157fc111d1adb9e9f4cb53a94e9
---
M include/osmocom/gsm/gsm0808.h
M src/gsm/gsm0808.c
2 files changed, 11 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/07/27307/1
diff --git a/include/osmocom/gsm/gsm0808.h b/include/osmocom/gsm/gsm0808.h
index c79da6a..b4c7803 100644
--- a/include/osmocom/gsm/gsm0808.h
+++ b/include/osmocom/gsm/gsm0808.h
@@ -246,8 +246,12 @@
const struct sockaddr_storage *aoip_transport_layer;
+ bool more_items; /*!< set this to true iff any fields below are used */
+
+ struct gsm0808_speech_codec_list codec_list_bss_supported; /*< omit when .len == 0 */
+
/* more items are defined in the spec and may be added later */
- bool more_items; /*!< always set this to false */
+ bool more_items2; /*!< always set this to false */
};
struct msgb *gsm0808_create_handover_request_ack2(const struct gsm0808_handover_request_ack *params);
diff --git a/src/gsm/gsm0808.c b/src/gsm/gsm0808.c
index 4f9c687..7013d8d 100644
--- a/src/gsm/gsm0808.c
+++ b/src/gsm/gsm0808.c
@@ -1045,6 +1045,12 @@
if (params->aoip_transport_layer)
gsm0808_enc_aoip_trasp_addr(msg, params->aoip_transport_layer);
+ /* AoIP: add Codec List (BSS Supported) 3.2.2.103.
+ * (codec_list_bss_supported was added to struct gsm0808_handover_request_ack later than speech_codec_chosen
+ * below, but it needs to come before it in the message coding). */
+ if (params->more_items && params->codec_list_bss_supported.len)
+ gsm0808_enc_speech_codec_list(msg, ¶ms->codec_list_bss_supported);
+
/* AoIP: Speech Codec (Chosen) 3.2.2.104 */
if (params->speech_codec_chosen_present)
gsm0808_enc_speech_codec(msg, ¶ms->speech_codec_chosen);
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/27307
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Iab0a7b4d81592157fc111d1adb9e9f4cb53a94e9
Gerrit-Change-Number: 27307
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: newchange
dexter has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/27199 )
Change subject: ranap_rab_ass: add function to check if RAB is in ReleaseList
......................................................................
ranap_rab_ass: add function to check if RAB is in ReleaseList
A RANAP RAB-AssignmentRelease may contain a ReleaseList. In order to
detect that a RAB is about to be released we need to be able to check if
the RAB we are dealing with is contained in such a ReleaseList.
Change-Id: I5b67cc2d35d11de7a09e66c181a1fdd5a58c75bb
Related: OS#5152
---
M include/osmocom/hnbgw/ranap_rab_ass.h
M src/osmo-hnbgw/ranap_rab_ass.c
M tests/ranap_rab_ass/ranap_rab_ass_test.c
M tests/ranap_rab_ass/ranap_rab_ass_test.ok
4 files changed, 103 insertions(+), 0 deletions(-)
Approvals:
pespin: Looks good to me, but someone else must approve
dexter: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/include/osmocom/hnbgw/ranap_rab_ass.h b/include/osmocom/hnbgw/ranap_rab_ass.h
index b3406f0..eb18de8 100644
--- a/include/osmocom/hnbgw/ranap_rab_ass.h
+++ b/include/osmocom/hnbgw/ranap_rab_ass.h
@@ -15,4 +15,5 @@
int ranap_rab_ass_resp_ies_replace_inet_addr(RANAP_RAB_AssignmentResponseIEs_t *ies, struct osmo_sockaddr *addr,
uint8_t rab_id);
+bool ranap_rab_ass_req_ies_check_release(RANAP_RAB_AssignmentRequestIEs_t *ies, uint8_t rab_id);
bool ranap_rab_ass_resp_ies_check_failure(RANAP_RAB_AssignmentResponseIEs_t *ies, uint8_t rab_id);
diff --git a/src/osmo-hnbgw/ranap_rab_ass.c b/src/osmo-hnbgw/ranap_rab_ass.c
index 030a1af..56886c7 100644
--- a/src/osmo-hnbgw/ranap_rab_ass.c
+++ b/src/osmo-hnbgw/ranap_rab_ass.c
@@ -135,6 +135,23 @@
return protocol_ie_field_pair;
}
+/* Pick the indexed item from the RAB release-list list and return a pointer to it */
+static RANAP_IE_t *release_item_from_ass_req_ies(const RANAP_RAB_AssignmentRequestIEs_t *ies, unsigned int index)
+{
+ /* Make sure we indeed deal with a setup-or-modify list */
+ if (!(ies->presenceMask & RAB_ASSIGNMENTREQUESTIES_RANAP_RAB_RELEASELIST_PRESENT)) {
+ RANAP_DEBUG
+ ("Decoding failed, the RANAP RAB AssignmentRequest did not contain a release list!\n");
+ return NULL;
+ }
+
+ /* Detect the end of the list */
+ if (index >= ies->raB_ReleaseList.raB_ReleaseList_ies.list.count)
+ return NULL;
+
+ return ies->raB_ReleaseList.raB_ReleaseList_ies.list.array[index];
+}
+
/* Pick the indexed item from the RAB setup-or-modified list and return a pointer to it */
static RANAP_IE_t *setup_or_modif_item_from_rab_ass_resp(const RANAP_RAB_AssignmentResponseIEs_t *ies,
unsigned int index)
@@ -261,6 +278,41 @@
}
}
+static int decode_rab_relitms_from_req_ies(RANAP_RAB_ReleaseItemIEs_t *items_ies,
+ RANAP_RAB_AssignmentRequestIEs_t *ies, uint8_t rab_id)
+{
+ RANAP_IE_t *release_list_ie;
+ RANAP_RAB_ReleaseItem_t *rab_release_item;
+ int rc;
+ uint8_t rab_id_decoded;
+ unsigned int index = 0;
+
+ while (1) {
+ release_list_ie = release_item_from_ass_req_ies(ies, index);
+ if (!release_list_ie)
+ return -EINVAL;
+
+ if (release_list_ie->id != RANAP_ProtocolIE_ID_id_RAB_ReleaseItem) {
+ RANAP_DEBUG("Decoding failed, the protocol IE is not of type RANAP RAB ReleaseItem!\n");
+ return -EINVAL;
+ }
+
+ rc = ranap_decode_rab_releaseitemies_fromlist(items_ies, &release_list_ie->value);
+ if (rc < 0)
+ return -EINVAL;
+
+ rab_release_item = &items_ies->raB_ReleaseItem;
+ /* The RAB-ID is defined as a bitstring with a size of 8 (1 byte),
+ * See also RANAP-IEs.asn, RAB-ID ::= BIT STRING (SIZE (8)) */
+ rab_id_decoded = rab_release_item->rAB_ID.buf[0];
+ if (rab_id_decoded == rab_id)
+ return index;
+
+ ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_RANAP_RAB_ReleaseItem, items_ies);
+ index++;
+ }
+}
+
/*! Extract IP address and port from RANAP_RAB_AssignmentRequestIEs.
* \ptmap[out] addr user provided memory to store extracted RTP stream IP-Address and port number.
* \ptmap[out] rab_id pointer to store RAB-ID (optional, can be NULL).
@@ -546,3 +598,25 @@
return result;
}
+
+/*! Check if a specific RAB is present in an RAB-ReleaseList inside RANAP_RAB_AssignmentRequestIEs.
+ * \ptmap[in] ies user provided memory with RANAP_RAB_AssignmentRequestIEs.
+ * \ptmap[in] rab_id expected rab id to look for.
+ * \returns true when RAB is intended for release; false otherwise */
+bool ranap_rab_ass_req_ies_check_release(RANAP_RAB_AssignmentRequestIEs_t *ies, uint8_t rab_id)
+{
+ RANAP_RAB_ReleaseItemIEs_t _rab_release_items_ies;
+ RANAP_RAB_ReleaseItemIEs_t *rab_release_items_ies = &_rab_release_items_ies;
+ int rc;
+ bool result = true;
+
+ /* If we can get a rlease list item for the specified RAB ID, then we know that the
+ * MSC intends to release the specified RAB */
+ rc = decode_rab_relitms_from_req_ies(rab_release_items_ies, ies, rab_id);
+ if (rc < 0)
+ result = false;
+
+ ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_RANAP_RAB_ReleaseItem, rab_release_items_ies);
+
+ return result;
+}
diff --git a/tests/ranap_rab_ass/ranap_rab_ass_test.c b/tests/ranap_rab_ass/ranap_rab_ass_test.c
index 5bb4efc..f7664e9 100644
--- a/tests/ranap_rab_ass/ranap_rab_ass_test.c
+++ b/tests/ranap_rab_ass/ranap_rab_ass_test.c
@@ -295,6 +295,31 @@
ranap_cn_rx_co_free(&message);
}
+void test_ranap_rab_ass_req_ies_check_release(void)
+{
+ int rc;
+ ranap_message message;
+ bool rab_release_req;
+ uint8_t testvec[] = {
+ 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x01, 0x00,
+ 0x29, 0x40, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x28,
+ 0x40, 0x03, 0x05, 0xd0, 0x00
+ };
+
+ rc = ranap_ran_rx_co_decode(talloc_asn1_ctx, &message, testvec, sizeof(testvec));
+ OSMO_ASSERT(rc == 0);
+
+ rab_release_req =
+ ranap_rab_ass_req_ies_check_release(&message.msg.raB_AssignmentRequestIEs, 23);
+ printf("ranap_rab_ass_req_ies_check_release rab_release_req=%u (RAB ID 23)\n", rab_release_req);
+
+ rab_release_req =
+ ranap_rab_ass_req_ies_check_release(&message.msg.raB_AssignmentRequestIEs, 44);
+ printf("ranap_rab_ass_req_ies_check_release rab_release_req=%u (RAB ID 44, which is not in the message)\n", rab_release_req);
+
+ ranap_ran_rx_co_free(&message);
+}
+
static const struct log_info_cat log_cat[] = {
[DRANAP] = {
.name = "RANAP", .loglevel = LOGL_DEBUG, .enabled = 1,
@@ -356,6 +381,7 @@
test_ranap_rab_ass_req_replace_inet_addr();
test_ranap_rab_ass_resp_replace_inet_addr();
test_ranap_rab_ass_resp_ies_check_failure();
+ test_ranap_rab_ass_req_ies_check_release();
test_cleanup();
return 0;
diff --git a/tests/ranap_rab_ass/ranap_rab_ass_test.ok b/tests/ranap_rab_ass/ranap_rab_ass_test.ok
index d372550..688925c 100644
--- a/tests/ranap_rab_ass/ranap_rab_ass_test.ok
+++ b/tests/ranap_rab_ass/ranap_rab_ass_test.ok
@@ -16,3 +16,5 @@
after: addr=1.2.3.4, port=1234
ranap_rab_ass_resp_ies_check_failure rab_failed_at_hnb=1 (RAB ID 23)
ranap_rab_ass_resp_ies_check_failure rab_failed_at_hnb=0 (RAB ID 44, which is not in the message)
+ranap_rab_ass_req_ies_check_release rab_release_req=1 (RAB ID 23)
+ranap_rab_ass_req_ies_check_release rab_release_req=0 (RAB ID 44, which is not in the message)
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/27199
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I5b67cc2d35d11de7a09e66c181a1fdd5a58c75bb
Gerrit-Change-Number: 27199
Gerrit-PatchSet: 4
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: fixeria.
dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/27199 )
Change subject: ranap_rab_ass: add function to check if RAB is in ReleaseList
......................................................................
Patch Set 4: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/27199
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I5b67cc2d35d11de7a09e66c181a1fdd5a58c75bb
Gerrit-Change-Number: 27199
Gerrit-PatchSet: 4
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 23 Feb 2022 14:56:06 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: fixeria, dexter.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/27199 )
Change subject: ranap_rab_ass: add function to check if RAB is in ReleaseList
......................................................................
Patch Set 4: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/27199
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I5b67cc2d35d11de7a09e66c181a1fdd5a58c75bb
Gerrit-Change-Number: 27199
Gerrit-PatchSet: 4
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 23 Feb 2022 14:53:10 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: pespin, fixeria.
dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/27199 )
Change subject: ranap_rab_ass: add function to check if RAB is in ReleaseList
......................................................................
Patch Set 4:
(1 comment)
File tests/ranap_rab_ass/ranap_rab_ass_test.c:
https://gerrit.osmocom.org/c/osmo-hnbgw/+/27199/comment/89e1d373_448e077b
PS3, Line 305: ranap_rab_ass_req_ies_check_release(&message.msg.raB_AssignmentRequestIEs, 23);
> Same as previous patch. Add a test with a different ID not found.
Done
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/27199
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I5b67cc2d35d11de7a09e66c181a1fdd5a58c75bb
Gerrit-Change-Number: 27199
Gerrit-PatchSet: 4
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 23 Feb 2022 14:52:01 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: pespin, fixeria.
Hello Jenkins Builder, laforge, pespin, fixeria, daniel,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-hnbgw/+/27199
to look at the new patch set (#4).
Change subject: ranap_rab_ass: add function to check if RAB is in ReleaseList
......................................................................
ranap_rab_ass: add function to check if RAB is in ReleaseList
A RANAP RAB-AssignmentRelease may contain a ReleaseList. In order to
detect that a RAB is about to be released we need to be able to check if
the RAB we are dealing with is contained in such a ReleaseList.
Change-Id: I5b67cc2d35d11de7a09e66c181a1fdd5a58c75bb
Related: OS#5152
---
M include/osmocom/hnbgw/ranap_rab_ass.h
M src/osmo-hnbgw/ranap_rab_ass.c
M tests/ranap_rab_ass/ranap_rab_ass_test.c
M tests/ranap_rab_ass/ranap_rab_ass_test.ok
4 files changed, 103 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/99/27199/4
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/27199
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I5b67cc2d35d11de7a09e66c181a1fdd5a58c75bb
Gerrit-Change-Number: 27199
Gerrit-PatchSet: 4
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newpatchset
dexter has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/27139 )
Change subject: ranap_rab_ass: add function to check if RAB is in FailureList
......................................................................
ranap_rab_ass: add function to check if RAB is in FailureList
A RANAP RAB-AssignmentResponse may contain a FailedList. In order to
detect that a RAB Assignment failed at the HNB we need to be able to
check if the RAB we are dealing with is contained an such a FailedList.
Change-Id: I4319f7caa45ea758ccd792cc8570521df075cf45
Related: OS#5152
---
M include/osmocom/hnbgw/ranap_rab_ass.h
M src/osmo-hnbgw/ranap_rab_ass.c
M tests/ranap_rab_ass/ranap_rab_ass_test.c
M tests/ranap_rab_ass/ranap_rab_ass_test.ok
4 files changed, 102 insertions(+), 2 deletions(-)
Approvals:
Jenkins Builder: Verified
dexter: Looks good to me, approved
diff --git a/include/osmocom/hnbgw/ranap_rab_ass.h b/include/osmocom/hnbgw/ranap_rab_ass.h
index f4d5cb6..b3406f0 100644
--- a/include/osmocom/hnbgw/ranap_rab_ass.h
+++ b/include/osmocom/hnbgw/ranap_rab_ass.h
@@ -14,3 +14,5 @@
uint8_t rab_id);
int ranap_rab_ass_resp_ies_replace_inet_addr(RANAP_RAB_AssignmentResponseIEs_t *ies, struct osmo_sockaddr *addr,
uint8_t rab_id);
+
+bool ranap_rab_ass_resp_ies_check_failure(RANAP_RAB_AssignmentResponseIEs_t *ies, uint8_t rab_id);
diff --git a/src/osmo-hnbgw/ranap_rab_ass.c b/src/osmo-hnbgw/ranap_rab_ass.c
index 5edbd3d..030a1af 100644
--- a/src/osmo-hnbgw/ranap_rab_ass.c
+++ b/src/osmo-hnbgw/ranap_rab_ass.c
@@ -141,8 +141,7 @@
{
/* Make sure we indeed deal with a setup-or-modified list */
if (!(ies->presenceMask & RAB_ASSIGNMENTRESPONSEIES_RANAP_RAB_SETUPORMODIFIEDLIST_PRESENT)) {
- RANAP_DEBUG
- ("Decoding failed, the RANAP RAB AssignmentResponse did not contain a setup-or-modified list!\n");
+ RANAP_DEBUG("RANAP RAB AssignmentResponse did not contain a setup-or-modified list!\n");
return NULL;
}
@@ -153,6 +152,23 @@
return ies->raB_SetupOrModifiedList.raB_SetupOrModifiedList_ies.list.array[index];
}
+/* Pick the indexed item from the RAB failed list and return a pointer to it */
+static RANAP_IE_t *failed_list_item_from_rab_ass_resp(const RANAP_RAB_AssignmentResponseIEs_t *ies,
+ unsigned int index)
+{
+ /* Make sure we indeed deal with a failed list */
+ if (!(ies->presenceMask & RAB_ASSIGNMENTRESPONSEIES_RANAP_RAB_FAILEDLIST_PRESENT)) {
+ RANAP_DEBUG("RANAP RAB AssignmentResponse did not contain a failed list!\n");
+ return NULL;
+ }
+
+ /* Detect the end of the list */
+ if (index >= ies->raB_FailedList.raB_FailedList_ies.list.count)
+ return NULL;
+
+ return ies->raB_FailedList.raB_FailedList_ies.list.array[index];
+}
+
/* find the RAB specified by rab_id in ies and when found, decode the result into items_ies */
static int decode_rab_smditms_from_resp_ies(RANAP_RAB_SetupOrModifiedItemIEs_t *items_ies,
RANAP_RAB_AssignmentResponseIEs_t *ies, uint8_t rab_id)
@@ -184,6 +200,37 @@
}
}
+/* See comment above decode_rab_smditms_from_resp_ies() */
+static int decode_rab_flitms_from_resp_ies(RANAP_RAB_FailedItemIEs_t *items_ies,
+ RANAP_RAB_AssignmentResponseIEs_t *ies, uint8_t rab_id)
+{
+ RANAP_IE_t *failed_list_ie;
+ RANAP_RAB_FailedItem_t *rab_failed_item;
+ int rc;
+ uint8_t rab_id_decoded;
+ unsigned int index = 0;
+
+ while (1) {
+ failed_list_ie = failed_list_item_from_rab_ass_resp(ies, index);
+ if (!failed_list_ie)
+ return -EINVAL;
+
+ rc = ranap_decode_rab_faileditemies_fromlist(items_ies, &failed_list_ie->value);
+ if (rc < 0)
+ return -EINVAL;
+
+ rab_failed_item = &items_ies->raB_FailedItem;
+ /* The RAB-ID is defined as a bitstring with a size of 8 (1 byte),
+ * See also RANAP-IEs.asn, RAB-ID ::= BIT STRING (SIZE (8)) */
+ rab_id_decoded = rab_failed_item->rAB_ID.buf[0];
+ if (rab_id_decoded == rab_id)
+ return index;
+
+ ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_RANAP_RAB_FailedItem, items_ies);
+ index++;
+ }
+}
+
/* find the RAB specified by rab_id in ies and when found, decode the result into item */
static int decode_rab_smditms_from_req_ies(RANAP_RAB_SetupOrModifyItemFirst_t *item,
RANAP_RAB_AssignmentRequestIEs_t *ies, uint8_t rab_id)
@@ -477,3 +524,25 @@
return rc;
}
+
+/*! Check if a specific RAB is present in an RAB-Failed-Item-List inside RANAP_RAB_AssignmentResponseIEs.
+ * \ptmap[in] ies user provided memory with RANAP_RAB_AssignmentResponseIEs.
+ * \ptmap[in] rab_id expected rab id to look for.
+ * \returns true when RAB could be identified as failed; false otherwise */
+bool ranap_rab_ass_resp_ies_check_failure(RANAP_RAB_AssignmentResponseIEs_t *ies, uint8_t rab_id)
+{
+ RANAP_RAB_FailedItemIEs_t _rab_failed_items_ies;
+ RANAP_RAB_FailedItemIEs_t *rab_failed_items_ies = &_rab_failed_items_ies;
+ int rc;
+ bool result = true;
+
+ /* If we can get a failed item for the specified RAB ID, then we know that the
+ * HNB reported the RAB Assignment as failed */
+ rc = decode_rab_flitms_from_resp_ies(rab_failed_items_ies, ies, rab_id);
+ if (rc < 0)
+ result = false;
+
+ ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_RANAP_RAB_FailedItem, rab_failed_items_ies);
+
+ return result;
+}
diff --git a/tests/ranap_rab_ass/ranap_rab_ass_test.c b/tests/ranap_rab_ass/ranap_rab_ass_test.c
index d7bee09..5bb4efc 100644
--- a/tests/ranap_rab_ass/ranap_rab_ass_test.c
+++ b/tests/ranap_rab_ass/ranap_rab_ass_test.c
@@ -269,6 +269,32 @@
ranap_cn_rx_co_free(&message);
}
+void test_ranap_rab_ass_resp_ies_check_failure(void)
+{
+ int rc;
+ ranap_message message;
+ bool rab_failed_at_hnb;
+ uint8_t testvec[] = {
+ 0x60, 0x00, 0x00, 0x11, 0x00, 0x00, 0x01, 0x00,
+ 0x23, 0x40, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x22,
+ 0x40, 0x03, 0x05, 0xd0, 0x00
+ };
+
+ rc = ranap_cn_rx_co_decode(talloc_asn1_ctx, &message, testvec, sizeof(testvec));
+ OSMO_ASSERT(rc == 0);
+
+ rab_failed_at_hnb =
+ ranap_rab_ass_resp_ies_check_failure(&message.msg.raB_AssignmentResponseIEs, 23);
+ printf("ranap_rab_ass_resp_ies_check_failure rab_failed_at_hnb=%u (RAB ID 23)\n", rab_failed_at_hnb);
+
+ rab_failed_at_hnb =
+ ranap_rab_ass_resp_ies_check_failure(&message.msg.raB_AssignmentResponseIEs, 44);
+ printf("ranap_rab_ass_resp_ies_check_failure rab_failed_at_hnb=%u (RAB ID 44, which is not in the message)\n",
+ rab_failed_at_hnb);
+
+ ranap_cn_rx_co_free(&message);
+}
+
static const struct log_info_cat log_cat[] = {
[DRANAP] = {
.name = "RANAP", .loglevel = LOGL_DEBUG, .enabled = 1,
@@ -329,6 +355,7 @@
test_ranap_rab_ass_resp_extract_inet_addr();
test_ranap_rab_ass_req_replace_inet_addr();
test_ranap_rab_ass_resp_replace_inet_addr();
+ test_ranap_rab_ass_resp_ies_check_failure();
test_cleanup();
return 0;
diff --git a/tests/ranap_rab_ass/ranap_rab_ass_test.ok b/tests/ranap_rab_ass/ranap_rab_ass_test.ok
index 97756cb..d372550 100644
--- a/tests/ranap_rab_ass/ranap_rab_ass_test.ok
+++ b/tests/ranap_rab_ass/ranap_rab_ass_test.ok
@@ -14,3 +14,5 @@
before: addr=10.9.1.164, port=1034
ranap_rab_ass_resp_replace_inet_addr rc=0
after: addr=1.2.3.4, port=1234
+ranap_rab_ass_resp_ies_check_failure rab_failed_at_hnb=1 (RAB ID 23)
+ranap_rab_ass_resp_ies_check_failure rab_failed_at_hnb=0 (RAB ID 44, which is not in the message)
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/27139
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I4319f7caa45ea758ccd792cc8570521df075cf45
Gerrit-Change-Number: 27139
Gerrit-PatchSet: 3
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: pespin, fixeria.
dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/27139 )
Change subject: ranap_rab_ass: add function to check if RAB is in FailureList
......................................................................
Patch Set 3: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/27139
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I4319f7caa45ea758ccd792cc8570521df075cf45
Gerrit-Change-Number: 27139
Gerrit-PatchSet: 3
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 23 Feb 2022 14:46:33 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment