<p>osmith has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17073">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">hlr: add TC_MSLookup_mDNS_service_GSUP_HLR_home<br><br>Request "gsup.hlr" service right after creating subscriber from the home<br>HLR. "TC_MSLookup_mDNS_service_other_home" is similar, but does not query<br>the "gsup.hlr" service. The "gsup.hlr" service has a different code path<br>in OsmoHLR:<br>- it exists without being explicitly configured and returns the IP and<br>  port of the HLR's own GSUP server<br>- the request is answered, even if the subscriber is not attached to the<br>  HLR (for Location Update via proxy)<br><br>Related: OS#4380<br>Change-Id: Id567989e4be7ac2d3857d3ea61a1ca3a2401a8dc<br>---<br>M hlr/HLR_Tests.ttcn<br>1 file changed, 44 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/73/17073/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/hlr/HLR_Tests.ttcn b/hlr/HLR_Tests.ttcn</span><br><span>index 82c74f4..c8c6712 100644</span><br><span>--- a/hlr/HLR_Tests.ttcn</span><br><span>+++ b/hlr/HLR_Tests.ttcn</span><br><span>@@ -1715,6 +1715,49 @@</span><br><span>       }</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+/* Request "gsup.hlr" service right after creating subscriber from the home HLR. "TC_MSLookup_mDNS_service_other_home"</span><br><span style="color: hsl(120, 100%, 40%);">+ * is similar, but does not query the "gsup.hlr" service. The "gsup.hlr" service has a different code path in OsmoHLR:</span><br><span style="color: hsl(120, 100%, 40%);">+ * - it exists without being explicitly configured and returns the IP and port of the HLR's own GSUP server</span><br><span style="color: hsl(120, 100%, 40%);">+ * - the request is answered, even if the subscriber is not attached to the HLR (for Location Update via proxy) */</span><br><span style="color: hsl(120, 100%, 40%);">+private function f_TC_MSLookup_mDNS_service_GSUP_HLR_home() runs on HLR_ConnHdlr {</span><br><span style="color: hsl(120, 100%, 40%);">+   timer T;</span><br><span style="color: hsl(120, 100%, 40%);">+      var MSLookup_mDNS vl_rmsg;</span><br><span style="color: hsl(120, 100%, 40%);">+    var integer id := f_rnd_int(65535); /* mDNS packet ID */</span><br><span style="color: hsl(120, 100%, 40%);">+      var charstring domain := "gsup.hlr." & hex2str(g_pars.sub.imsi) & ".imsi.mdns.osmocom.org";</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+     /* Create subscriber */</span><br><span style="color: hsl(120, 100%, 40%);">+       g_pars.sub.msisdn := '133713381339'H;</span><br><span style="color: hsl(120, 100%, 40%);">+ f_vty_subscr_create(VTY, g_pars.sub);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+       /* Send mDNS query, expect result */</span><br><span style="color: hsl(120, 100%, 40%);">+  mDNS.send(ts_MSLookup_mDNS_query(id, domain));</span><br><span style="color: hsl(120, 100%, 40%);">+        T.start(1.0);</span><br><span style="color: hsl(120, 100%, 40%);">+ alt {</span><br><span style="color: hsl(120, 100%, 40%);">+ [] mDNS.receive(tr_MSLookup_mDNS_result_IPv4(id, domain, f_enc_IPv4(mp_hlr_ip), mp_hlr_gsup_port)) {</span><br><span style="color: hsl(120, 100%, 40%);">+          setverdict(pass);</span><br><span style="color: hsl(120, 100%, 40%);">+             }</span><br><span style="color: hsl(120, 100%, 40%);">+     [] mDNS.receive(MSLookup_mDNS:?) -> value vl_rmsg {</span><br><span style="color: hsl(120, 100%, 40%);">+                repeat;</span><br><span style="color: hsl(120, 100%, 40%);">+               }</span><br><span style="color: hsl(120, 100%, 40%);">+     [] T.timeout {</span><br><span style="color: hsl(120, 100%, 40%);">+                setverdict(fail, "OsmoHLR did not answer to mDNS query");</span><br><span style="color: hsl(120, 100%, 40%);">+           }</span><br><span style="color: hsl(120, 100%, 40%);">+     }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   f_vty_subscr_delete(VTY, g_pars.sub);</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+testcase TC_MSLookup_mDNS_service_GSUP_HLR_home() runs on test_CT {</span><br><span style="color: hsl(120, 100%, 40%);">+ var hexstring imsi := f_rnd_imsi('26242'H);</span><br><span style="color: hsl(120, 100%, 40%);">+   var HLR_ConnHdlr vc_conn;</span><br><span style="color: hsl(120, 100%, 40%);">+     var HLR_ConnHdlrPars pars := valueof(t_Pars(imsi));</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ f_init(false);</span><br><span style="color: hsl(120, 100%, 40%);">+        f_vty_config(VTY, "mslookup", "mdns bind");</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+     vc_conn := f_start_handler(refers(f_TC_MSLookup_mDNS_service_GSUP_HLR_home), pars);</span><br><span style="color: hsl(120, 100%, 40%);">+   vc_conn.done;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> /* TODO:</span><br><span>   * UL with ISD error</span><br><span>   * UL with ISD timeout</span><br><span>@@ -1764,6 +1807,7 @@</span><br><span>   if (mp_hlr_supports_dgsm) {</span><br><span>          execute( TC_MSLookup_mDNS_service_other_home() );</span><br><span>            execute( TC_MSLookup_GSUP_proxy() );</span><br><span style="color: hsl(120, 100%, 40%);">+          execute( TC_MSLookup_mDNS_service_GSUP_HLR_home() );</span><br><span>         }</span><br><span> };</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17073">change 17073</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17073"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-ttcn3-hacks </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Id567989e4be7ac2d3857d3ea61a1ca3a2401a8dc </div>
<div style="display:none"> Gerrit-Change-Number: 17073 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: osmith <osmith@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>