summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2018-05-30 17:22:02 +0200
committerHarald Welte <laforge@gnumonks.org>2018-07-05 15:40:43 +0000
commit33e5261154f12e21321c8090c4fd276295066d45 (patch)
tree1aa8a598a89a270fa1f55b482d958303ed90102c /library
parenta59afab67fe44b52b0f7090c77fd9f10a592b05a (diff)
GGSN_Tests: test what happens when PCO contains only one DNS entry
When the protocol configuration options (PCO) contain an IPCP container then lists only one one DNS server (normally there are two included, a primary and a secondary). Than the parser in osmo-ggsn runs into an endles loop. This testcase tries to provoke this behavior by sending PDP CONTEXT ACTIVATE messages with PCO that contain only a single DNS entry per IPCP container. The hanging of osmo-ggsn is already fixed (see Depends). However when Primary and Secondary DNS are in separate IPCP containers, then only the first IPCP container is parsed (see also OS#3381) Change-Id: I71761e1f9db7ceac3c3df43d2e539f8c8d53c4fc Depends: osmo-msc Icffde89f9bc5d8fcadf6e2dd6c0b4de03440edd5 Closes: OS#3288 Related: OS#3381
Diffstat (limited to 'library')
-rw-r--r--library/GTP_Templates.ttcn37
1 files changed, 37 insertions, 0 deletions
diff --git a/library/GTP_Templates.ttcn b/library/GTP_Templates.ttcn
index 44ec439..a222b2e 100644
--- a/library/GTP_Templates.ttcn
+++ b/library/GTP_Templates.ttcn
@@ -400,6 +400,36 @@ module GTP_Templates {
}
}
+ template ProtConfigOptions ts_PCO_IPv4_PRI_DNS_IPCP modifies ts_PCO := {
+ protocols := {
+ /* dummy PAP entry to check if our parser can cope with a single primary DNS entry
+ * see Change-Id Icffde89f9bc5d8fcadf6e2dd6c0b4de03440edd5 and OS#3288 */
+ { protocolID := 'C023'O, lengthProtoID := 0, protoIDContents := ''O },
+ { protocolID := '8021'O, lengthProtoID := 16, protoIDContents :=
+ enc_IpcpPacket(valueof(ts_IPCP_ReqDNS_Primary)) }
+ }
+ }
+ template ProtConfigOptions ts_PCO_IPv4_SEC_DNS_IPCP modifies ts_PCO := {
+ protocols := {
+ /* dummy PAP entry to check if our parser can cope with a single secondary DNS entry
+ * see Change-Id Icffde89f9bc5d8fcadf6e2dd6c0b4de03440edd5 and OS#3288 */
+ { protocolID := 'C023'O, lengthProtoID := 0, protoIDContents := ''O },
+ { protocolID := '8021'O, lengthProtoID := 16, protoIDContents :=
+ enc_IpcpPacket(valueof(ts_IPCP_ReqDNS_Secondary)) }
+ }
+ }
+ template ProtConfigOptions ts_PCO_IPv4_SEPARATE_DNS_IPCP modifies ts_PCO := {
+ protocols := {
+ /* dummy PAP entry to check if our parser can cope with a primary and secondary DNS
+ * in separate IPCP containers OS#3381 */
+ { protocolID := 'C023'O, lengthProtoID := 0, protoIDContents := ''O },
+ { protocolID := '8021'O, lengthProtoID := 16, protoIDContents :=
+ enc_IpcpPacket(valueof(ts_IPCP_ReqDNS_Primary)) },
+ { protocolID := '8021'O, lengthProtoID := 16, protoIDContents :=
+ enc_IpcpPacket(valueof(ts_IPCP_ReqDNS_Secondary)) }
+ }
+ }
+
template ProtocolElement tr_PCO_Proto(OCT2 prot_id) := {
protocolID := prot_id,
lengthProtoID := ?,
@@ -468,6 +498,13 @@ module GTP_Templates {
ts_IPCP(LCP_Configure_Request, identifier,
{ tr_IPCP_PrimaryDns('00000000'O), tr_IPCP_SecondaryDns('00000000'O) });
+ template IpcpPacket ts_IPCP_ReqDNS_Primary(uint8_t identifier := 0) :=
+ ts_IPCP(LCP_Configure_Request, identifier,
+ { tr_IPCP_PrimaryDns('00000000'O) });
+ template IpcpPacket ts_IPCP_ReqDNS_Secondary(uint8_t identifier := 0) :=
+ ts_IPCP(LCP_Configure_Request, identifier,
+ { tr_IPCP_SecondaryDns('00000000'O) });
+
function f_teardown_ind_IE(in template (omit) BIT1 ind) return template (omit) TearDownInd {
if (istemplatekind(ind, "omit")) {
return omit;