This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/13564
Change subject: ggsn: Add TC_pdp4_act_deact_ipcp_pap_broken()
......................................................................
ggsn: Add TC_pdp4_act_deact_ipcp_pap_broken()
This test case reproduces a real-world PCO capture including a broken
PAP AuthenticationReq. It triggers some weird behavior in OsmoGGSN
1.3.0 where it would send duplicate IPCP repsonses and no PAP response.
Change-Id: Ie89d984ed9e26fbbb2e4914bdb8623446d462a4c
Related: OS#3914
---
M ggsn_tests/GGSN_Tests.ttcn
M library/GTP_Templates.ttcn
2 files changed, 40 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/64/13564/1
diff --git a/ggsn_tests/GGSN_Tests.ttcn b/ggsn_tests/GGSN_Tests.ttcn
index 9370904..c42ee21 100644
--- a/ggsn_tests/GGSN_Tests.ttcn
+++ b/ggsn_tests/GGSN_Tests.ttcn
@@ -899,6 +899,35 @@
f_pdp_ctx_del(ctx, '1'B);
}
+ /* Test PDP context activation for dynamic IPv4 EUA with IPv4 DNS in IPCP + PAP authentication (broken) */
+ testcase TC_pdp4_act_deact_ipcp_pap_broken() runs on GT_CT {
+ f_init();
+ var OCT4 ggsn_ip4_dns1 := f_inet_addr(m_ggsn_ip4_dns1);
+ var OCT4 ggsn_ip4_dns2 := f_inet_addr(m_ggsn_ip4_dns2);
+ var PdpContext ctx := valueof(t_DefinePDP(f_rnd_imsi('26242'H), '1234'O, c_ApnInternet, valueof(t_EuaIPv4Dyn)));
+ ctx.pco_req := valueof(ts_PCO_PAP_IPv4_DNS);
+ f_pdp_ctx_act(ctx);
+ f_PCO_ensure_no_duplicates(ctx.pco_neg);
+ /* verify IPCP is at all contained */
+ if (not match(ctx.pco_neg, tr_PCO_Contains('8021'O))) {
+ setverdict(fail, "IPCP not found in PCO");
+ }
+ /* verify IPCP contains both primary and secondary DNS */
+ var IpcpPacket ipcp := dec_IpcpPacket(f_PCO_extract_proto(ctx.pco_neg, '8021'O));
+ if (not match(ipcp, tr_IPCP_Ack_DNS(0, ggsn_ip4_dns1, ggsn_ip4_dns2))) {
+ if (not match(ipcp, tr_IPCP_Ack_DNS(0))) {
+ setverdict(fail, "Primary/Secondary DNS PCO IPCP option not found");
+ } else {
+ setverdict(fail, "Primary/Secondary DNS PCO IPCP option found but not matching expected values");
+ }
+ }
+ /* verify that PAP is contained */
+ if (not match(ctx.pco_neg, tr_PCO_Contains('8023'O))) {
+ setverdict(fail, "IPCP not found in PCO");
+ }
+ f_pdp_ctx_del(ctx, '1'B);
+ }
+
/* Test PDP context activation for dynamic IPv4 EUA with IPv4 DNS in PCO */
testcase TC_pdp4_act_deact_pcodns() runs on GT_CT {
f_init();
diff --git a/library/GTP_Templates.ttcn b/library/GTP_Templates.ttcn
index bd39e27..e1f19f1 100644
--- a/library/GTP_Templates.ttcn
+++ b/library/GTP_Templates.ttcn
@@ -460,6 +460,17 @@
lengthProtoID := ?,
protoIDContents := ?
}
+ template ProtocolElement ts_PCOelem_PAP_broken := {
+ protocolID := 'C023'O,
+ lengthProtoID := 60,
+ protoIDContents := '0100003c0444435338323700bc1c08087c1508083e00790000150808fd06000001000000000000000000000000000000000000000000000000000000'O
+ }
+ template ProtConfigOptions ts_PCO_PAP_IPv4_DNS modifies ts_PCO := {
+ protocols := {
+ ts_PCOelem_PAP_broken,
+ { protocolID := '8021'O, lengthProtoID := 16, protoIDContents := enc_IpcpPacket(valueof(ts_IPCP_ReqDNS)) }
+ }
+ }
template ProtConfigOptions tr_PCO_Contains(OCT2 prot_id) modifies tr_PCO := {
protocols := { *, tr_PCO_Proto(prot_id), * }
}
--
To view, visit https://gerrit.osmocom.org/13564
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie89d984ed9e26fbbb2e4914bdb8623446d462a4c
Gerrit-Change-Number: 13564
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190410/33f9c636/attachment.htm>