osmith has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38382?usp=email )
Change subject: ggsn: add test TC_pdp4_clients_interact_with_ext_hdr
......................................................................
ggsn: add test TC_pdp4_clients_interact_with_ext_hdr
Related: OS#6223
Change-Id: Ic767f8b50f034171d71cae16512d1d26a07b24bf
---
M ggsn_tests/GGSN_Tests.ttcn
1 file changed, 36 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/82/38382/1
diff --git a/ggsn_tests/GGSN_Tests.ttcn b/ggsn_tests/GGSN_Tests.ttcn
index e88ab80..5cac964 100644
--- a/ggsn_tests/GGSN_Tests.ttcn
+++ b/ggsn_tests/GGSN_Tests.ttcn
@@ -144,7 +144,13 @@
var uint16_t g_d_seq_nr;
port TELNETasp_PT GGSNVTY;
+
+ /* gtpu_hdr_opt_part has 3GPP TS 29.060 § 6 GTP header optional
+ * fields and § 6.1 extension headers. When use_gtpu_txseq is
+ * set, the Sequence Number gets set automatically. */
+ var template (omit) GTPU_Header_optional_part gtpu_hdr_opt_part := omit;
var boolean use_gtpu_txseq := false;
+
var integer g_use_echo_intval := 0; /* 0 = disabled */
/* Emulated PCRF, used with m_ggsn_impl = GGSN_IMPL_OPEN5GS */
@@ -399,10 +405,15 @@
/* send GTP-U for a given context and increment sequence number */
function f_send_gtpu(inout PdpContext ctx, in octetstring data) runs on GT_CT {
- var template (omit) GTPU_Header_optional_part opt_part;
+ var template (omit) GTPU_Header_optional_part opt_part := gtpu_hdr_opt_part;
if (use_gtpu_txseq) {
- opt_part := f_GTPU_opt_part_from_seq(g_d_seq_nr);
+ if (istemplatekind(opt_part, "omit")) {
+ opt_part := f_GTPU_opt_part_from_seq(g_d_seq_nr);
+ } else {
+ opt_part.sequenceNumber := int2oct(g_d_seq_nr, 2);
+ }
+
g_d_seq_nr := (g_d_seq_nr + 1) mod 65536;
}
@@ -1403,6 +1414,7 @@
/* Validate if different clients (pdp ctx) can reach one another through GGSN. */
testcase TC_pdp4_clients_interact_with_txseq() runs on GT_CT {
use_gtpu_txseq := true;
+ gtpu_hdr_opt_part := omit;
f_pdp4_clients_interact();
f_shutdown_helper();
}
@@ -1410,6 +1422,27 @@
/* Validate if different clients (pdp ctx) can reach one another through GGSN (without
Tx sequence number). */
testcase TC_pdp4_clients_interact_without_txseq() runs on GT_CT {
use_gtpu_txseq := false;
+ gtpu_hdr_opt_part := omit;
+ f_pdp4_clients_interact();
+ f_shutdown_helper();
+ }
+
+ /* Validate if different clients (pdp ctx) can reach one another through
+ * GGSN (with GTPU extension header, OS#6223) */
+ testcase TC_pdp4_clients_interact_with_ext_hdr() runs on GT_CT {
+ use_gtpu_txseq := false;
+ gtpu_hdr_opt_part := {
+ sequenceNumber := '0000'O,
+ npduNumber := '00'O,
+ nextExtHeader := 'C0'O, /* PDCP PDU number */
+ gTPU_extensionHeader_List := {
+ {
+ lengthfield := 1,
+ content := '0001'O,
+ nextExtHeader := '00'O
+ }
+ }
+ };
f_pdp4_clients_interact();
f_shutdown_helper();
}
@@ -2283,6 +2316,7 @@
execute(TC_pdp4_act_deact_gtpu_access_ipv6_apn4());
execute(TC_pdp4_clients_interact_with_txseq());
execute(TC_pdp4_clients_interact_without_txseq());
+ execute(TC_pdp4_clients_interact_with_ext_hdr());
execute(TC_pdp4_act_deact_with_single_dns());
execute(TC_pdp4_act_deact_with_separate_dns());
execute(TC_pdp4_act_update_teic());
--
To view, visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38382?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ic767f8b50f034171d71cae16512d1d26a07b24bf
Gerrit-Change-Number: 38382
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>