Attention is currently required from: osmith, pespin.
pespin has removed a vote from this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/27319 )
Change subject: jenkins-build-osmo-hnbgw: Build osmo-mgw as dependency
......................................................................
Removed Verified-1 by Jenkins Builder (1000002)
--
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/27319
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Change-Id: Ic32160c8e1a00ae299344e029f3909a8e24c7291
Gerrit-Change-Number: 27319
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: deleteVote
Attention is currently required from: pespin, daniel.
dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/27320 )
Change subject: mgw_fsm: release call when FSM is not created
......................................................................
Patch Set 1:
(1 comment)
File src/osmo-hnbgw/mgw_fsm.c:
https://gerrit.osmocom.org/c/osmo-hnbgw/+/27320/comment/206b7d3e_281d0509
PS1, Line 724: tx_release_req(map);
> Shouldn't we instead return a RAB assignment response with a failed list?
We could, but then the formatting of the message would be more difficult. If we would have gone for multiple-rab support I would say we definitely do that, but here I think its better to kill everything with by sending an IuRelease. (I don't think this is a spec violation.)
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/27320
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I1904f7e95d86bbcecee14f8721bd4075d0e33ab4
Gerrit-Change-Number: 27320
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 24 Feb 2022 14:37:00 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: daniel <dwillmann(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: osmith, pespin.
daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/27319 )
Change subject: jenkins-build-osmo-hnbgw: Build osmo-mgw as dependency
......................................................................
Patch Set 1: Verified+1
(1 comment)
Patchset:
PS1:
The jenkins failure seems unrelated. I ran jenkins-build-osmo-hnbgw.sh locally and it built everything without issue.
--
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/27319
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Change-Id: Ic32160c8e1a00ae299344e029f3909a8e24c7291
Gerrit-Change-Number: 27319
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 24 Feb 2022 14:17:24 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: pespin, dexter.
daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/27320 )
Change subject: mgw_fsm: release call when FSM is not created
......................................................................
Patch Set 1:
(1 comment)
File src/osmo-hnbgw/mgw_fsm.c:
https://gerrit.osmocom.org/c/osmo-hnbgw/+/27320/comment/485bcd2e_bd5d67b3
PS1, Line 724: tx_release_req(map);
Shouldn't we instead return a RAB assignment response with a failed list?
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/27320
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I1904f7e95d86bbcecee14f8721bd4075d0e33ab4
Gerrit-Change-Number: 27320
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 24 Feb 2022 14:11:45 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/27320 )
Change subject: mgw_fsm: release call when FSM is not created
......................................................................
mgw_fsm: release call when FSM is not created
While the FSM is created the RAB Assignment Requests is checked and
parsed. In case of failure the context is freed, but the CN is not
informed about the problem. The RAB AssignmentRequest will then most
likely time out. However, lets make sure the call is released by re
requesting an IU Release.
Change-Id: I1904f7e95d86bbcecee14f8721bd4075d0e33ab4
Related: OS#5152
---
M src/osmo-hnbgw/mgw_fsm.c
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/20/27320/1
diff --git a/src/osmo-hnbgw/mgw_fsm.c b/src/osmo-hnbgw/mgw_fsm.c
index d4ef800..3da2b60 100644
--- a/src/osmo-hnbgw/mgw_fsm.c
+++ b/src/osmo-hnbgw/mgw_fsm.c
@@ -719,9 +719,9 @@
return 0;
error:
- /* TODO: If we fail in this early stage, we should generate an appropriate RAB AssignmentResponse to inform
- * the core network about the failure. */
+ /* Cleanup context and make sure that the call is cleared. */
mgw_fsm_priv_cleanup(mgw_fsm_priv);
+ tx_release_req(map);
return -EINVAL;
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/27320
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I1904f7e95d86bbcecee14f8721bd4075d0e33ab4
Gerrit-Change-Number: 27320
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newchange
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/27321 )
Change subject: ranap_rab_ass: check for more than one RAB assignment req
......................................................................
ranap_rab_ass: check for more than one RAB assignment req
The spec permits RAB AssignmentRequests with multiple RABs at a time.
Even though one voice call is assigned only one RAB in practice. Since
the current FSM implementation only supports a 1:1 scenario, lets check
if the MSC really assigns only one RAB and block RAB Assignments that do
not fit in this scheme.
Change-Id: I0f1d868fd0b4dc413533d6fcc5482862825181be
Related: OS#5152
---
M include/osmocom/hnbgw/ranap_rab_ass.h
M src/osmo-hnbgw/mgw_fsm.c
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
5 files changed, 56 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/21/27321/1
diff --git a/include/osmocom/hnbgw/ranap_rab_ass.h b/include/osmocom/hnbgw/ranap_rab_ass.h
index eb18de8..13fd2df 100644
--- a/include/osmocom/hnbgw/ranap_rab_ass.h
+++ b/include/osmocom/hnbgw/ranap_rab_ass.h
@@ -17,3 +17,5 @@
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);
+
+int ranap_rab_ass_req_ies_get_count(RANAP_RAB_AssignmentRequestIEs_t *ies);
diff --git a/src/osmo-hnbgw/mgw_fsm.c b/src/osmo-hnbgw/mgw_fsm.c
index 3da2b60..b777ef7 100644
--- a/src/osmo-hnbgw/mgw_fsm.c
+++ b/src/osmo-hnbgw/mgw_fsm.c
@@ -689,6 +689,16 @@
mgw_fsm_priv = talloc_zero(map, struct mgw_fsm_priv);
mgw_fsm_priv->ranap_rab_ass_req_message = message;
+ /* This FSM only supports RAB assignments with a single RAB assignment only. This limitation has been taken
+ * into account under the assumption that voice calls typically require a single RAB only. Nevertheless, we
+ * will block all incoming RAB assignments that try to assign more (or less) then one RAB. */
+ if (ranap_rab_ass_req_ies_get_count(&message->msg.raB_AssignmentRequestIEs) != 1) {
+ LOGP(DMGW, LOGL_ERROR,
+ "mgw_fsm_alloc_and_handle_rab_ass_req() rua_ctx_id=%d, RAB-AssignmentRequest with more than one RAB assignment -- abort!\n",
+ map->rua_ctx_id);
+ goto error;
+ }
+
/* Parse the RAB Assignment Request now, if it is bad for some reason we will exit early and not bother with
* creating an FSM etc. */
ies = &mgw_fsm_priv->ranap_rab_ass_req_message->msg.raB_AssignmentRequestIEs;
diff --git a/src/osmo-hnbgw/ranap_rab_ass.c b/src/osmo-hnbgw/ranap_rab_ass.c
index 56886c7..5930451 100644
--- a/src/osmo-hnbgw/ranap_rab_ass.c
+++ b/src/osmo-hnbgw/ranap_rab_ass.c
@@ -620,3 +620,18 @@
return result;
}
+
+/*! Find out how many RAB items are present in a RAB-SetupOrModifyList inside RANAP_RAB_AssignmentRequestIEs.
+ * \ptmap[in] ies user provided memory with RANAP_RAB_AssignmentRequestIEs.
+ * \returns number of RAB items, -1 on failure. */
+int ranap_rab_ass_req_ies_get_count(RANAP_RAB_AssignmentRequestIEs_t *ies)
+{
+ /* Make sure we indeed deal with a setup-or-modify list */
+ if (!(ies->presenceMask & RAB_ASSIGNMENTREQUESTIES_RANAP_RAB_SETUPORMODIFYLIST_PRESENT)) {
+ RANAP_DEBUG
+ ("Decoding failed, the RANAP RAB AssignmentRequest did not contain a setup-or-modify list!\n");
+ return -1;
+ }
+
+ return ies->raB_SetupOrModifyList.list.count;
+}
diff --git a/tests/ranap_rab_ass/ranap_rab_ass_test.c b/tests/ranap_rab_ass/ranap_rab_ass_test.c
index 052549e..9a98cf8 100644
--- a/tests/ranap_rab_ass/ranap_rab_ass_test.c
+++ b/tests/ranap_rab_ass/ranap_rab_ass_test.c
@@ -320,6 +320,33 @@
ranap_ran_rx_co_free(&message);
}
+void test_ranap_rab_ass_req_ies_get_count(void)
+{
+ int rc;
+ ranap_message message;
+ uint8_t testvec[] = {
+ 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x01, 0x00,
+ 0x36, 0x40, 0x52, 0x00, 0x00, 0x01, 0x00, 0x35,
+ 0x00, 0x48, 0x78, 0x22, 0xcd, 0x80, 0x10, 0x2f,
+ 0xa7, 0x20, 0x1a, 0x2c, 0x00, 0x00, 0xf4, 0x4c,
+ 0x08, 0x0a, 0x02, 0x80, 0x00, 0x51, 0x40, 0x00,
+ 0x27, 0x20, 0x28, 0x14, 0x00, 0x67, 0x40, 0x00,
+ 0x00, 0x22, 0x28, 0x14, 0x00, 0x3c, 0x40, 0x00,
+ 0x00, 0x00, 0x50, 0x3d, 0x02, 0x00, 0x02, 0x27,
+ 0xc0, 0x35, 0x00, 0x01, 0x0a, 0x09, 0x01, 0xa2,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x1f, 0x76,
+ 0x00, 0x00, 0x40, 0x01, 0x00, 0x00
+ };
+
+ rc = ranap_ran_rx_co_decode(talloc_asn1_ctx, &message, testvec, sizeof(testvec));
+ OSMO_ASSERT(rc == 0);
+
+ rc = ranap_rab_ass_req_ies_get_count(&message.msg.raB_AssignmentRequestIEs);
+ printf("ranap_rab_ass_req_ies_get_count rc=%d\n", rc);
+ ranap_ran_rx_co_free(&message);
+}
+
static const struct log_info_cat log_cat[] = {
[DRANAP] = {
.name = "RANAP", .loglevel = LOGL_DEBUG, .enabled = 1,
@@ -382,6 +409,7 @@
test_ranap_rab_ass_resp_ies_replace_inet_addr();
test_ranap_rab_ass_resp_ies_check_failure();
test_ranap_rab_ass_req_ies_check_release();
+ test_ranap_rab_ass_req_ies_get_count();
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 688925c..aca4ff3 100644
--- a/tests/ranap_rab_ass/ranap_rab_ass_test.ok
+++ b/tests/ranap_rab_ass/ranap_rab_ass_test.ok
@@ -18,3 +18,4 @@
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)
+ranap_rab_ass_req_ies_get_count rc=1
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/27321
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I0f1d868fd0b4dc413533d6fcc5482862825181be
Gerrit-Change-Number: 27321
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newchange
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:
> That's about osmo-gsm-tester building(?) osmo-hnbgw and it seems to complain about missing dependenc […]
Fix for osmo-gsm-tester_build-osmo-hnbgw here: https://gerrit.osmocom.org/c/osmo-gsm-tester/+/27319
--
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:43:38 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: osmith <osmith(a)sysmocom.de>
Comment-In-Reply-To: daniel <dwillmann(a)sysmocom.de>
Gerrit-MessageType: comment
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