pespin has submitted this change. ( 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(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, approved
diff --git a/ggsn_tests/GGSN_Tests.ttcn b/ggsn_tests/GGSN_Tests.ttcn
index bef7949..b66d7ba 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,44 @@
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(?), 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 +436,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 +453,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 +1699,40 @@
/* Test IPv4v6 context activation for dynamic IPv4v6 EUA on a v4-only APN */
testcase TC_pdp46_act_deact_apn4() runs on GT_CT {
+ const OCT1 cause_accept := '80'O; /* Normal accept cause */
+ const OCT1 cause_new_pdp_type := '81'O; /* Cause: New PDP type due to network preference */
+ const OCT1 cause_unknown_pdp := 'DC'O; /* Cause: Unknown PDP address or PDP type */
+ var CreatePDPContextResponse cpr;
+
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, cause_accept); /* 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, cause_unknown_pdp); /* 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). */
2 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted 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: 3
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-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: osmith, dexter.
daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/27318 )
Change subject: Reenable ttcn3-hnbgw-test
......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS2:
> Patch looks fine, but it seems not to pass yet: […]
That's about osmo-gsm-tester building(?) osmo-hnbgw and it seems to complain about missing dependencies:
"""
configure: error: Package requirements (libosmo-mgcp-client >= 1.9.0) were not met:
Package 'libosmo-mgcp-client', required by 'virtual:world', not found
"""
The test was successful when I ran it manually:
https://jenkins.osmocom.org/jenkins/view/TTCN3/job/ttcn3-hnbgw-test/
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/27318
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I4c7d1ee876e90d52827b2d8cc57342298dd44061
Gerrit-Change-Number: 27318
Gerrit-PatchSet: 2
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 24 Feb 2022 13:32:22 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: comment
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 2: Code-Review+2
(3 comments)
File ggsn_tests/GGSN_Tests.ttcn:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27314/comment/55326be4_d5b1…
PS1, Line 366: if (not match(cpr.endUserAddress, tr_EuaIPv4(?)) and
> Let's make it shorter: […]
Done
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27314/comment/74a23494_66f6…
PS1, Line 1704: cause_accept
> Defined but not used, why?
Done
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27314/comment/227e84f7_7ed7…
PS1, Line 1705: var
> const, here and the line below
Done
--
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: 2
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: Thu, 24 Feb 2022 13:01:57 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: 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 12:
(1 comment)
Patchset:
PS12:
Good pointer, Neels. Updated to use osmo_time_cc's total_sum instead of a separate timestamp tracker. I'm still seeing a strange build failure in handover_tests when running make check.
--
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: 12
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: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Thu, 24 Feb 2022 12:41:47 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: iedemam, laforge.
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 (#12).
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, 89 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/81/27081/12
--
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: 12
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-MessageType: newpatchset