pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35977?usp=email )

Change subject: epdg: Validate assigned PDP Address and APN
......................................................................

epdg: Validate assigned PDP Address and APN

Change-Id: I440a7379c6dab5448d4c57c498ad9d086d0c456b
---
M epdg/EPDG_Tests.ttcn
M library/GSUP_Templates.ttcn
2 files changed, 20 insertions(+), 2 deletions(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, approved
  osmith: Looks good to me, but someone else must approve




diff --git a/epdg/EPDG_Tests.ttcn b/epdg/EPDG_Tests.ttcn
index 89a85f1..2ad1b32 100644
--- a/epdg/EPDG_Tests.ttcn
+++ b/epdg/EPDG_Tests.ttcn
@@ -605,8 +605,8 @@
        /* Expect a positive response back to the translator; */
        var template (present) GSUP_IEs pdp_info := {
                        tr_GSUP_IE_PDP_CONTEXT_ID(?),
-                       tr_GSUP_IE_PDP_ADDRESS(?),
-                       tr_GSUP_IE_APN(?),
+                       
tr_GSUP_IE_PDP_ADDRESS(tr_GSUP_PDP_Address_IPv4(f_inet_addr(g_pars.ue_ip))),
+                       tr_GSUP_IE_APN(f_enc_dns_hostname(g_pars.apn)),
                        tr_GSUP_IE_PDP_QOS(?),
                        tr_GSUP_IE_Charging_Characteristics(?)
                        };
diff --git a/library/GSUP_Templates.ttcn b/library/GSUP_Templates.ttcn
index 05b8295..10c682c 100644
--- a/library/GSUP_Templates.ttcn
+++ b/library/GSUP_Templates.ttcn
@@ -69,6 +69,15 @@
 }
 template (value) GSUP_PDP_Address ts_EuaIPv4Dyn := 
ts_GSUP_PDP_Address_IPv4(omit);

+template (present) GSUP_PDP_Address tr_GSUP_PDP_Address_IPv4(template OCT4 
ip_addr) := {
+       ipv4 := {
+               spare := ?,
+               pdp_typeorg := '0001'B,
+               pdp_typenum := '21'O,
+               ipv4_address := ip_addr
+       }
+}
+
 template GSUP_IE ts_GSUP_IE_AuthTuple2G(octetstring rand, octetstring sres,
                                        octetstring kc) := {
        tag := OSMO_GSUP_AUTH_TUPLE_IE,

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35977?usp=email
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: I440a7379c6dab5448d4c57c498ad9d086d0c456b
Gerrit-Change-Number: 35977
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus <[email protected]>
Gerrit-Reviewer: osmith <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged

Reply via email to