<p>fixeria <strong>submitted</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/osmo-msc/+/26410">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  fixeria: Looks good to me, approved
  Jenkins Builder: Verified

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">libmsc: ran_iu_make_security_mode_command(): clarify UIA mask<br><br>Change-Id: I7535d5ede5b22c61575a16d15927598e6137392a<br>---<br>M src/libmsc/ran_msg_iu.c<br>1 file changed, 5 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/libmsc/ran_msg_iu.c b/src/libmsc/ran_msg_iu.c</span><br><span>index 6705ab8..cf57d35 100644</span><br><span>--- a/src/libmsc/ran_msg_iu.c</span><br><span>+++ b/src/libmsc/ran_msg_iu.c</span><br><span>@@ -375,6 +375,8 @@</span><br><span> static struct msgb *ran_iu_make_security_mode_command(struct osmo_fsm_inst *caller_fi,</span><br><span>                                                    const struct ran_cipher_mode_command *cm)</span><br><span> {</span><br><span style="color: hsl(120, 100%, 40%);">+  /* TODO: make the choice of available UIA algorithms configurable */</span><br><span style="color: hsl(120, 100%, 40%);">+  const uint8_t uia_mask = (1 << OSMO_UTRAN_UIA1) | (1 << OSMO_UTRAN_UIA2);</span><br><span>        bool use_encryption = cm->utran.uea_encryption_mask > (1 << OSMO_UTRAN_UEA0);</span><br><span> </span><br><span>        LOG_RAN_IU_ENC(caller_fi, LOGL_DEBUG, "Tx RANAP SECURITY MODE COMMAND to RNC, IK=%s, CK=%s\n",</span><br><span>@@ -384,7 +386,9 @@</span><br><span>        * in the case of A5? */</span><br><span>     return ranap_new_msg_sec_mod_cmd2(cm->vec->ik,</span><br><span>                                           use_encryption ? cm->vec->ck : NULL,</span><br><span style="color: hsl(0, 100%, 40%);">-                                      RANAP_KeyStatus_new, 0x06, cm->utran.uea_encryption_mask);</span><br><span style="color: hsl(120, 100%, 40%);">+                                         RANAP_KeyStatus_new,</span><br><span style="color: hsl(120, 100%, 40%);">+                                          (uia_mask << 1), /* API treats LSB as UIA0 */</span><br><span style="color: hsl(120, 100%, 40%);">+                                   cm->utran.uea_encryption_mask);</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-msc/+/26410">change 26410</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-msc/+/26410"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-msc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I7535d5ede5b22c61575a16d15927598e6137392a </div>
<div style="display:none"> Gerrit-Change-Number: 26410 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>