<p>fixeria has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmocom-bb/+/14860">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">mobile/gsm480_ss.c: gsm480_tx_release_compl(): fix cause IE encoding<br><br>According to GSM TS 04.08, section 10.5.4.11, location and coding<br>standard are encoded before the cause value, not vice-versa!<br><br>Also, coding standards other than "1 1 - Standard defined for the<br>GSM PLMNs" shall not be used if the cause can be represented with<br>the GSM standardized coding.<br><br>Change-Id: Ic6abcfb9a9589f5b0c9c40def863f15ae04d0bdd<br>---<br>M src/host/layer23/src/mobile/gsm480_ss.c<br>1 file changed, 7 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/60/14860/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/host/layer23/src/mobile/gsm480_ss.c b/src/host/layer23/src/mobile/gsm480_ss.c</span><br><span>index b114aa6..e462916 100644</span><br><span>--- a/src/host/layer23/src/mobile/gsm480_ss.c</span><br><span>+++ b/src/host/layer23/src/mobile/gsm480_ss.c</span><br><span>@@ -397,12 +397,17 @@</span><br><span>     gh->proto_discr = GSM48_PDISC_NC_SS | (trans->transaction_id << 4);</span><br><span>      gh->msg_type = GSM0480_MTYPE_RELEASE_COMPLETE;</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ /* GSM 04.08, section 10.5.4.11 */</span><br><span>   if (cause) {</span><br><span>                 uint8_t *tlv = msgb_put(msg, 4);</span><br><span>             tlv[0] = GSM48_IE_CAUSE;</span><br><span>             tlv[1] = 2;</span><br><span style="color: hsl(0, 100%, 40%);">-             tlv[2] = 0x80 | cause;</span><br><span style="color: hsl(0, 100%, 40%);">-          tlv[3] = 0x80 | GSM48_CAUSE_LOC_USER;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+               /* Coding standard defined for the GSM PLMNs,</span><br><span style="color: hsl(120, 100%, 40%);">+          * location - USER, cause as given by caller,</span><br><span style="color: hsl(120, 100%, 40%);">+          * no extension, no diagnostics. */</span><br><span style="color: hsl(120, 100%, 40%);">+           cause_ie[2] = (1 << 7) | (0x03 << 5) | (GSM48_CAUSE_LOC_USER & 0x0f);</span><br><span style="color: hsl(120, 100%, 40%);">+         cause_ie[3] = (1 << 7) | cause;</span><br><span>        }</span><br><span>    return gsm480_to_mm(msg, trans, GSM48_MMSS_DATA_REQ);</span><br><span> }</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmocom-bb/+/14860">change 14860</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/osmocom-bb/+/14860"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmocom-bb </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ic6abcfb9a9589f5b0c9c40def863f15ae04d0bdd </div>
<div style="display:none"> Gerrit-Change-Number: 14860 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: fixeria <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>