<p>Harald Welte <strong>merged</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/osmo-bts/+/14324">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;">common/rsl.c: RSL_IE_HANDO_REF is mandatory for handover CHAN ACT<br><br>According to 3GPP TS 48.058, section 8.4.1, the Handover Reference<br>element must be included if channel activation type is 'handover'.<br>Let's properly reject CHANnel ACTivation messages with missing<br>RSL_IE_HANDO_REF. Otherwise such requests are misinterpreted<br>as regular (non-handover) channel requests.<br><br>Found using TC_ho_rach() TTCN-3 test case.<br><br>Change-Id: I9c50e1dbeb54c5470560adcdfb2bdf5abbe47993<br>---<br>M src/common/rsl.c<br>1 file changed, 7 insertions(+), 3 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/common/rsl.c b/src/common/rsl.c</span><br><span>index b96182f..410b38a 100644</span><br><span>--- a/src/common/rsl.c</span><br><span>+++ b/src/common/rsl.c</span><br><span>@@ -1090,9 +1090,13 @@</span><br><span>            memset(&lchan->encr, 0, sizeof(lchan->encr));</span><br><span> </span><br><span>  /* 9.3.9 Handover Reference */</span><br><span style="color: hsl(0, 100%, 40%);">-  if ((type == RSL_ACT_INTER_ASYNC ||</span><br><span style="color: hsl(0, 100%, 40%);">-          type == RSL_ACT_INTER_SYNC) &&</span><br><span style="color: hsl(0, 100%, 40%);">-         TLVP_PRES_LEN(&tp, RSL_IE_HANDO_REF, 1)) {</span><br><span style="color: hsl(120, 100%, 40%);">+    if ((type == RSL_ACT_INTER_ASYNC || type == RSL_ACT_INTER_SYNC)) {</span><br><span style="color: hsl(120, 100%, 40%);">+            /* According to 8.4.1, the Handover Reference element is included</span><br><span style="color: hsl(120, 100%, 40%);">+              * if activation type is handover. Assuming it's mandatory. */</span><br><span style="color: hsl(120, 100%, 40%);">+            if (!TLVP_PRES_LEN(&tp, RSL_IE_HANDO_REF, 1)) {</span><br><span style="color: hsl(120, 100%, 40%);">+                   LOGPLCHAN(lchan, DRSL, LOGL_NOTICE, "Missing Handover Reference IE\n");</span><br><span style="color: hsl(120, 100%, 40%);">+                     return rsl_tx_chan_act_nack(lchan, RSL_ERR_MAND_IE_ERROR);</span><br><span style="color: hsl(120, 100%, 40%);">+            }</span><br><span>            lchan->ho.active = HANDOVER_ENABLED;</span><br><span>              lchan->ho.ref = *TLVP_VAL(&tp, RSL_IE_HANDO_REF);</span><br><span>     }</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bts/+/14324">change 14324</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-bts/+/14324"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-bts </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I9c50e1dbeb54c5470560adcdfb2bdf5abbe47993 </div>
<div style="display:none"> Gerrit-Change-Number: 14324 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Vadim Yanitskiy <axilirator@gmail.com> </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-MessageType: merged </div>