<p>Pau Espin Pedrol <strong>merged</strong> this change.</p><p><a href="https://gerrit.osmocom.org/9949">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">lib: GTP_Emulation: Allow receiving packets with TEID 0<br><br>Some GTP messages like Echo Request, Echo Reply and Ind Error don't use<br>the TEID value. According to 3GPP TS 29.060 sec 9.3.1 in those cases the TEID is<br>set to 0:<br><br>"""<br>- TEID: Contains the Tunnel Endpoint Identifier for the tunnel to which this T-PDU belongs. The TEID shall be<br>used by the receiving entity to find the PDP context, except for the following cases:<br>- The Echo Request/Response and Supported Extension Headers notification messages, where the Tunnel<br>Endpoint Identifier shall be set to all zeroes.<br>- The Error Indication message where the Tunnel Endpoint Identifier shall be set to all zeros.<br>"""<br><br>Change-Id: Ic702b78028e850ed961ef805f35e10a42da34e56<br>---<br>M library/GTP_Emulation.ttcn<br>1 file changed, 11 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/library/GTP_Emulation.ttcn b/library/GTP_Emulation.ttcn</span><br><span>index 534fdef..615309a 100644</span><br><span>--- a/library/GTP_Emulation.ttcn</span><br><span>+++ b/library/GTP_Emulation.ttcn</span><br><span>@@ -185,10 +185,19 @@</span><br><span>                 var template hexstring imsi_t := f_gtpc_extract_imsi(g1c_ud.gtpc);</span><br><span>           if (isvalue(imsi_t)) {</span><br><span>                       vc_conn := f_comp_by_imsi(valueof(imsi_t));</span><br><span style="color: hsl(0, 100%, 40%);">-             } else {</span><br><span style="color: hsl(120, 100%, 40%);">+                      CLIENT.send(g1c_ud) to vc_conn;</span><br><span style="color: hsl(120, 100%, 40%);">+               } else if(g1c_ud.gtpc.teid != int2oct(0, 4)) {</span><br><span>                       vc_conn := f_comp_by_teid(g1c_ud.gtpc.teid);</span><br><span style="color: hsl(120, 100%, 40%);">+                  CLIENT.send(g1c_ud) to vc_conn;</span><br><span style="color: hsl(120, 100%, 40%);">+               } else {</span><br><span style="color: hsl(120, 100%, 40%);">+                      /* Send to all clients */</span><br><span style="color: hsl(120, 100%, 40%);">+                     var integer i;</span><br><span style="color: hsl(120, 100%, 40%);">+                        for (i := 0; i < sizeof(TidTable); i := i+1) {</span><br><span style="color: hsl(120, 100%, 40%);">+                             if (isbound(TidTable[i].teid) and TidTable[i].teid == teid) {</span><br><span style="color: hsl(120, 100%, 40%);">+                                 CLIENT.send(g1c_ud) to TidTable[i].vc_conn;</span><br><span style="color: hsl(120, 100%, 40%);">+                           }</span><br><span style="color: hsl(120, 100%, 40%);">+                     }</span><br><span>            }</span><br><span style="color: hsl(0, 100%, 40%);">-               CLIENT.send(g1c_ud) to vc_conn;</span><br><span>              }</span><br><span>    [] GTPU.receive(Gtp1uUnitdata:?) -> value g1u_ud {</span><br><span>                vc_conn := f_comp_by_teid(g1u_ud.gtpu.teid);</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/9949">change 9949</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/9949"/><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-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: Ic702b78028e850ed961ef805f35e10a42da34e56 </div>
<div style="display:none"> Gerrit-Change-Number: 9949 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Pau Espin Pedrol <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: Pau Espin Pedrol <pespin@sysmocom.de> </div>