epdg: Transmit MIP6-Agent-Info AVP in S6b SAR
Inform the AAA-server about the selected PDN-GW. Change-Id: Ia0f00a00b6474e19bb4cdc77724c75a55ef5c1f9
This commit is contained in:
parent
9b2ebc005f
commit
009ab6fe1c
|
@ -18,6 +18,7 @@ import from GSUP_Emulation all;
|
|||
|
||||
import from DIAMETER_Types all;
|
||||
import from DIAMETER_Templates all;
|
||||
import from DIAMETER_rfc4004_Templates all;
|
||||
import from DIAMETER_ts29_273_Templates all;
|
||||
import from DIAMETER_Emulation all;
|
||||
|
||||
|
@ -434,6 +435,9 @@ private function f_S6b_AA_success() runs on EPDG_ConnHdlr {
|
|||
var PDU_DIAMETER rx_dia;
|
||||
var UINT32 hbh_id := f_rnd_octstring(4);
|
||||
var UINT32 ete_id := f_rnd_octstring(4);
|
||||
var template (value) MIPv4_NONE_MIP_Home_Agent_Address pgw_addr;
|
||||
|
||||
pgw_addr := ts_AVP_Home_Agent_Address(IP, f_inet_addr(mp_s2b_local_ip));
|
||||
|
||||
/* Unlike AAR, AAA contains no IMSI. Register ete_id in DIAMETER_Emulation,
|
||||
* so AIA is forwarded back to us in DIAMETER port instead of MTC_CT.DIAMETER_UNIT.
|
||||
|
@ -442,7 +446,9 @@ private function f_S6b_AA_success() runs on EPDG_ConnHdlr {
|
|||
|
||||
S6b.send(ts_DIA_S6b_AAR(f_nai(),
|
||||
int2oct(DIA_TS29_373_MIP6_Feature_Vector_GTPv2_SUPPORTED, 8),
|
||||
g_pars.apn, hbh_id := hbh_id, ete_id := ete_id));
|
||||
g_pars.apn,
|
||||
pgw_addr,
|
||||
hbh_id := hbh_id, ete_id := ete_id));
|
||||
|
||||
/* AAR in S6b in AAA-Server triggers Service-Assignment Request/Answer towards HSS: */
|
||||
as_DIA_SWx_SA_success();
|
||||
|
|
|
@ -55,7 +55,7 @@ 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_272_Templates.ttcn DIAMETER_ts29_273_Templates.ttcn "
|
||||
FILES+="DIAMETER_Templates.ttcn DIAMETER_rfc4004_Templates.ttcn DIAMETER_rfc5447_Templates.ttcn DIAMETER_ts29_272_Templates.ttcn DIAMETER_ts29_273_Templates.ttcn "
|
||||
FILES+="IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc
|
||||
IPA_Emulation.ttcnpp "
|
||||
FILES+="PCO_Types.ttcn GSUP_Types.ttcn GSUP_Templates.ttcn GSUP_Emulation.ttcn "
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
module DIAMETER_rfc4004_Templates {
|
||||
|
||||
/* (C) 2023 by sysmocom s.f.m.c. GmbH <info@sysmocom.de
|
||||
* All rights reserved.
|
||||
*
|
||||
* Released under the terms of GNU General Public License, Version 2 or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0-or-later
|
||||
*/
|
||||
|
||||
import from General_Types all;
|
||||
import from DIAMETER_Types all;
|
||||
import from DIAMETER_Templates all;
|
||||
import from Osmocom_Types all;
|
||||
import from Misc_Helpers all;
|
||||
|
||||
/* 4.2.1. MIP6-Agent-Info AVP */
|
||||
template (value) MIPv4_NONE_MIP_Home_Agent_Address ts_AVP_Home_Agent_Address(template (value) AddressType addr_type,
|
||||
template (value) octetstring addr_data) := {
|
||||
address_type := addr_type,
|
||||
address_data := addr_data
|
||||
}
|
||||
|
||||
template (value) GenericAVP ts_AVP_MIPHomeAgentAddress(template (value) MIPv4_NONE_MIP_Home_Agent_Address addr) := {
|
||||
avp := {
|
||||
avp_header := ts_DIA_Hdr(c_AVP_Code_MIPv4_NONE_MIP_Home_Agent_Address),
|
||||
avp_data := {
|
||||
avp_MIPv4_NONE_MIP_Home_Agent_Address := addr
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -14,6 +14,19 @@ import from DIAMETER_Types all;
|
|||
import from DIAMETER_Templates all;
|
||||
import from Osmocom_Types all;
|
||||
import from Misc_Helpers all;
|
||||
import from DIAMETER_rfc4004_Templates all;
|
||||
|
||||
/* 4.2.1. MIP6-Agent-Info AVP */
|
||||
template (value) GenericAVP ts_AVP_MIP6AgentInfo(template (value) MIPv4_NONE_MIP_Home_Agent_Address addr) := {
|
||||
avp := {
|
||||
avp_header := ts_DIA_Hdr(c_AVP_Code_MIPv6_NONE_MIP6_Agent_Info),
|
||||
avp_data := {
|
||||
avp_MIPv6_NONE_MIP6_Agent_Info := {
|
||||
ts_AVP_MIPHomeAgentAddress(addr)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 4.2.5. MIP6-Feature-Vector AVP */
|
||||
const uint64_t DIA_RFC5447_MIP6_Feature_Vector_MIP6_INTEGRATED := hex2int('0000000000000001'H);
|
||||
|
|
|
@ -283,6 +283,7 @@ template (value) PDU_DIAMETER
|
|||
ts_DIA_S6b_AAR(template (value) charstring username_nai,
|
||||
template (value) MIPv6_NONE_MIP6_Feature_Vector mip6_feat_vec,
|
||||
template (value) charstring apn,
|
||||
template (value) MIPv4_NONE_MIP_Home_Agent_Address pgw_addr,
|
||||
template (value) octetstring sess_id := c_def_sess_id,
|
||||
template (value) charstring orig_host := "pgw.localdomain",
|
||||
template (value) charstring orig_realm := "localdomain",
|
||||
|
@ -303,6 +304,7 @@ ts_DIA_S6b_AAR(template (value) charstring username_nai,
|
|||
ts_AVP_DestinationRealm(dest_realm),
|
||||
ts_AVP_AuthRequestType(AUTHORIZE_ONLY),
|
||||
ts_AVP_UserName(char2oct(valueof(username_nai))),
|
||||
ts_AVP_MIP6AgentInfo(pgw_addr),
|
||||
ts_AVP_MIP6FeatureVector(mip6_feat_vec),
|
||||
ts_AVP_ServiceSelection(valueof(apn))
|
||||
/* TODO: Lots other optional */
|
||||
|
|
|
@ -64,7 +64,7 @@ FILES+="GTPv2_PrivateExtensions.ttcn GTPv2_Templates.ttcn "
|
|||
FILES+="GTPv2_CodecPort.ttcn GTPv2_CodecPort_CtrlFunctDef.cc GTPv2_CodecPort_CtrlFunct.ttcn GTPv2_Emulation.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_ts29_212_Templates.ttcn DIAMETER_ts29_272_Templates.ttcn DIAMETER_rfc5447_Templates.ttcn DIAMETER_ts29_273_Templates.ttcn DIAMETER_ts32_299_Templates.ttcn "
|
||||
FILES+="DIAMETER_Templates.ttcn DIAMETER_rfc4004_Templates.ttcn DIAMETER_rfc5447_Templates.ttcn DIAMETER_ts29_212_Templates.ttcn DIAMETER_ts29_272_Templates.ttcn DIAMETER_ts29_273_Templates.ttcn DIAMETER_ts32_299_Templates.ttcn "
|
||||
gen_links $DIR $FILES
|
||||
|
||||
ignore_pp_results
|
||||
|
|
Loading…
Reference in New Issue