hlr: add TC_MSLookup_mDNS_service_GSUP_HLR_home
Request "gsup.hlr" service right after creating subscriber from the home HLR. "TC_MSLookup_mDNS_service_other_home" is similar, but does not query the "gsup.hlr" service. The "gsup.hlr" service has a different code path in OsmoHLR: - it exists without being explicitly configured and returns the IP and port of the HLR's own GSUP server - the request is answered, even if the subscriber is not attached to the HLR (for Location Update via proxy) Related: OS#4380 Change-Id: Id567989e4be7ac2d3857d3ea61a1ca3a2401a8dc
This commit is contained in:
parent
b51a53fdfa
commit
18b48081fe
|
@ -1715,6 +1715,49 @@ testcase TC_MSLookup_GSUP_proxy() runs on test_CT {
|
|||
}
|
||||
}
|
||||
|
||||
/* Request "gsup.hlr" service right after creating subscriber from the home HLR. "TC_MSLookup_mDNS_service_other_home"
|
||||
* is similar, but does not query the "gsup.hlr" service. The "gsup.hlr" service has a different code path in OsmoHLR:
|
||||
* - it exists without being explicitly configured and returns the IP and port of the HLR's own GSUP server
|
||||
* - the request is answered, even if the subscriber is not attached to the HLR (for Location Update via proxy) */
|
||||
private function f_TC_MSLookup_mDNS_service_GSUP_HLR_home() runs on HLR_ConnHdlr {
|
||||
timer T;
|
||||
var MSLookup_mDNS vl_rmsg;
|
||||
var integer id := f_rnd_int(65535); /* mDNS packet ID */
|
||||
var charstring domain := "gsup.hlr." & hex2str(g_pars.sub.imsi) & ".imsi.mdns.osmocom.org";
|
||||
|
||||
/* Create subscriber */
|
||||
g_pars.sub.msisdn := '133713381339'H;
|
||||
f_vty_subscr_create(VTY, g_pars.sub);
|
||||
|
||||
/* Send mDNS query, expect result */
|
||||
mDNS.send(ts_MSLookup_mDNS_query(id, domain));
|
||||
T.start(1.0);
|
||||
alt {
|
||||
[] mDNS.receive(tr_MSLookup_mDNS_result_IPv4(id, domain, f_enc_IPv4(mp_hlr_ip), mp_hlr_gsup_port)) {
|
||||
setverdict(pass);
|
||||
}
|
||||
[] mDNS.receive(MSLookup_mDNS:?) -> value vl_rmsg {
|
||||
repeat;
|
||||
}
|
||||
[] T.timeout {
|
||||
setverdict(fail, "OsmoHLR did not answer to mDNS query");
|
||||
}
|
||||
}
|
||||
|
||||
f_vty_subscr_delete(VTY, g_pars.sub);
|
||||
}
|
||||
testcase TC_MSLookup_mDNS_service_GSUP_HLR_home() runs on test_CT {
|
||||
var hexstring imsi := f_rnd_imsi('26242'H);
|
||||
var HLR_ConnHdlr vc_conn;
|
||||
var HLR_ConnHdlrPars pars := valueof(t_Pars(imsi));
|
||||
|
||||
f_init(false);
|
||||
f_vty_config(VTY, "mslookup", "mdns bind");
|
||||
|
||||
vc_conn := f_start_handler(refers(f_TC_MSLookup_mDNS_service_GSUP_HLR_home), pars);
|
||||
vc_conn.done;
|
||||
}
|
||||
|
||||
/* TODO:
|
||||
* UL with ISD error
|
||||
* UL with ISD timeout
|
||||
|
@ -1764,6 +1807,7 @@ control {
|
|||
if (mp_hlr_supports_dgsm) {
|
||||
execute( TC_MSLookup_mDNS_service_other_home() );
|
||||
execute( TC_MSLookup_GSUP_proxy() );
|
||||
execute( TC_MSLookup_mDNS_service_GSUP_HLR_home() );
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue