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

Change subject: epdg: Add PDP-Info IE to GSUP Auth Info Req
......................................................................

epdg: Add PDP-Info IE to GSUP Auth Info Req

Strongswan already has this information during first IKE_AUTH message,
see 3GPP TS 24.302 7.2.2.1.

Change-Id: I42e4dc4bbcef969aae5867dbb103f8a5db157c89
---
M epdg/EPDG_Tests.ttcn
M epdg/gen_links.sh
M library/GSUP_Templates.ttcn
3 files changed, 31 insertions(+), 7 deletions(-)

Approvals:
  Jenkins Builder: Verified
  lynxis lazus: Looks good to me, approved




diff --git a/epdg/EPDG_Tests.ttcn b/epdg/EPDG_Tests.ttcn
index 14bb060..aceedd4 100644
--- a/epdg/EPDG_Tests.ttcn
+++ b/epdg/EPDG_Tests.ttcn
@@ -5,6 +5,7 @@
 import from Native_Functions all;
 import from Osmocom_Types all;
 import from L3_Common all;
+import from DNS_Helpers all;

 import from IPA_Emulation all;
 import from GSUP_Types all;
@@ -552,13 +553,17 @@
 /* GSUP AuthInfo Req + Resp, triggers SWx MAR + MAA. */
 private function f_GSUP_AI_success() runs on EPDG_ConnHdlr {
        var GSUP_PDU rx_gsup;
-       var template (present) GSUP_IE auth_tuple_ie := 
tr_GSUP_IE_AuthTuple3G(g_pars.vec.rand,
-                                                                              
g_pars.vec.ik,
-                                                                              
g_pars.vec.ck,
-                                                                              
g_pars.vec.autn,
-                                                                              
g_pars.vec.rand  & g_pars.vec.auts);
-
-       GSUP.send(ts_GSUP_SAI_REQ(g_pars.imsi));
+       var template (present) GSUP_IE auth_tuple_ie;
+       var template (value) GSUP_IEs pdp_info;
+       auth_tuple_ie := tr_GSUP_IE_AuthTuple3G(g_pars.vec.rand,
+                                               g_pars.vec.ik,
+                                               g_pars.vec.ck,
+                                               g_pars.vec.autn,
+                                               g_pars.vec.rand & 
g_pars.vec.auts);
+       pdp_info := { ts_GSUP_IE_PDP_CONTEXT_ID('00'O),
+                     ts_GSUP_IE_PDP_ADDRESS(ts_EuaIPv4Dyn),
+                     ts_GSUP_IE_APN(f_enc_dns_hostname(g_pars.apn)) };
+       GSUP.send(ts_GSUP_SAI_REQ_PDP_INFO(g_pars.imsi, pdp_info));
        as_DIA_SWx_MA_success();
        /* Expect a positive response back to the translator; expect AIA */
        alt {
diff --git a/epdg/gen_links.sh b/epdg/gen_links.sh
index 82a0785..c8eadc8 100755
--- a/epdg/gen_links.sh
+++ b/epdg/gen_links.sh
@@ -41,6 +41,7 @@
 FILES="Misc_Helpers.ttcn General_Types.ttcn GSM_Types.ttcn Osmocom_Types.ttcn 
Native_Functions.ttcn Native_FunctionDefs.cc "
 FILES+="Osmocom_CTRL_Types.ttcn "
 FILES+="L3_Common.ttcn "
+FILES+="DNS_Helpers.ttcn "
 FILES+="DIAMETER_Types.ttcn DIAMETER_CodecPort.ttcn 
DIAMETER_CodecPort_CtrlFunct.ttcn DIAMETER_CodecPort_CtrlFunctDef.cc 
DIAMETER_Emulation.ttcn "
 FILES+="DIAMETER_Templates.ttcn DIAMETER_rfc5447_Templates.ttcn 
DIAMETER_ts29_273_Templates.ttcn "
 FILES+="IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn 
IPA_CodecPort_CtrlFunctDef.cc
diff --git a/library/GSUP_Templates.ttcn b/library/GSUP_Templates.ttcn
index 3a616a6..05b8295 100644
--- a/library/GSUP_Templates.ttcn
+++ b/library/GSUP_Templates.ttcn
@@ -324,6 +324,12 @@
                        valueof(ts_GSUP_IE_NUM_VECTORS_REQ(num_auth_vectors))
                        });

+template (value) GSUP_PDU ts_GSUP_SAI_REQ_PDP_INFO(hexstring imsi, template 
(value) GSUP_IEs pdp_info) :=
+       ts_GSUP(OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST, {
+                       valueof(ts_GSUP_IE_IMSI(imsi)),
+                       valueof(ts_GSUP_IE_PdpInfo_ie(pdp_info))
+                       });
+
 template GSUP_PDU tr_GSUP_SAI_REQ(template hexstring imsi) :=
        tr_GSUP_IMSI(OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST, imsi);


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

Reply via email to