From 7399673d0e0dddf4588c130c1a36874bf6419bb4 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Mon, 23 Oct 2023 18:16:21 +0200 Subject: [PATCH] epdg: Tx MIP6-Feature-Vector in s6b AAR msg This AVP is actually mandatory as per Table 9.1.2.2.1 in TS 29.273. Change-Id: I47e1f7ff583f60d0d16e151dbfe64fbd33fd7774 --- epdg/EPDG_Tests.ttcn | 2 +- library/DIAMETER_ts29_273_Templates.ttcn | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/epdg/EPDG_Tests.ttcn b/epdg/EPDG_Tests.ttcn index 396ca0e1c..5710d0c66 100644 --- a/epdg/EPDG_Tests.ttcn +++ b/epdg/EPDG_Tests.ttcn @@ -375,7 +375,7 @@ private function f_S6b_AA_success() runs on EPDG_ConnHdlr { */ f_epdg_connhldr_S6b_expect_eteid(ete_id); - S6b.send(ts_DIA_S6b_AAR(g_pars.imsi, hbh_id := hbh_id, ete_id := ete_id)); + S6b.send(ts_DIA_S6b_AAR(g_pars.imsi, int2oct(DIA_TS29_373_MIP6_Feature_Vector_GTPv2_SUPPORTED, 8), hbh_id := hbh_id, ete_id := ete_id)); alt { [] S6b.receive(tr_DIA_S6b_AAA) -> value rx_dia {} [] S6b.receive(PDU_DIAMETER:?) -> value rx_dia { diff --git a/library/DIAMETER_ts29_273_Templates.ttcn b/library/DIAMETER_ts29_273_Templates.ttcn index 5df1cf177..3daf299ec 100644 --- a/library/DIAMETER_ts29_273_Templates.ttcn +++ b/library/DIAMETER_ts29_273_Templates.ttcn @@ -14,6 +14,7 @@ module DIAMETER_ts29_273_Templates { import from General_Types all; import from DIAMETER_Types all; import from DIAMETER_Templates all; +import from DIAMETER_rfc5447_Templates all; import from Osmocom_Types all; import from Misc_Helpers all; @@ -22,6 +23,13 @@ const uint32_t c_DIAMETER_3GPP_SWx_AID := 16777265; /* 3GPP TS 29.273 Section 9 */ const uint32_t c_DIAMETER_3GPP_S6b_AID := 16777272; +/* 5.2.3.3 MIP6-Feature-Vector bits */ +const uint64_t DIA_TS29_373_MIP6_Feature_Vector_PMIP6_SUPPORTED := hex2int('0000010000000000'H); +const uint64_t DIA_TS29_373_MIP6_Feature_Vector_ASSIGN_LOCAL_IP := hex2int('0000080000000000'H); +const uint64_t DIA_TS29_373_MIP6_Feature_Vector_MIP4_SUPPORTED := hex2int('0000100000000000'H); +const uint64_t DIA_TS29_373_MIP6_Feature_Vector_OPTIMIZED_IDLE_MODE_MOBILITY := hex2int('0000200000000000'H); +const uint64_t DIA_TS29_373_MIP6_Feature_Vector_GTPv2_SUPPORTED := hex2int('0000400000000000'H); + /******************************* * SWx 3GPP TS 29.273 section 8 *******************************/ @@ -198,6 +206,7 @@ ts_DIA_SWx_SAA(template (value) hexstring imsi, /* TS 29.273 9.2.2.5.1 AA-Request (AAR) */ template (value) PDU_DIAMETER ts_DIA_S6b_AAR(template (value) hexstring imsi, + template (value) MIPv6_NONE_MIP6_Feature_Vector mip6_feat_vec, template (value) octetstring sess_id := c_def_sess_id, template (value) charstring orig_host := "pgw.localdomain", template (value) charstring orig_realm := "localdomain", @@ -217,7 +226,8 @@ ts_DIA_S6b_AAR(template (value) hexstring imsi, ts_AVP_OriginRealm(orig_realm), ts_AVP_DestinationRealm(dest_realm), ts_AVP_AuthRequestType(AUTHORIZE_ONLY), - ts_AVP_UserNameImsi(valueof(imsi)) + ts_AVP_UserNameImsi(valueof(imsi)), + ts_AVP_MIP6FeatureVector(mip6_feat_vec) /* TODO: Lots other optional */ });