<p>fixeria has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-msc/+/26409">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">libmsc: ran_iu_make_security_mode_command(): improve readability<br><br>Change-Id: I14f4f9617f91ed17fb7614f218cb023a0231866d<br>---<br>M src/libmsc/ran_msg_iu.c<br>1 file changed, 4 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/09/26409/1</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 8ffdd93..6705ab8 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,13 +375,15 @@</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%);">+  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>                     osmo_hexdump_nospc(cm->vec->ik, 16),</span><br><span style="color: hsl(0, 100%, 40%);">-                      cm->utran.uea_encryption_mask > (1 << OSMO_UTRAN_UEA0) ? osmo_hexdump_nospc(cm->vec->ck, 16) : "NONE");</span><br><span style="color: hsl(120, 100%, 40%);">+                   use_encryption ? osmo_hexdump_nospc(cm->vec->ck, 16) : "NONE");</span><br><span>      /* TODO: Do we need to check if the UE supports all of the algorithms and build an intersection like</span><br><span>          * in the case of A5? */</span><br><span style="color: hsl(0, 100%, 40%);">-        return ranap_new_msg_sec_mod_cmd2(cm->vec->ik, cm->utran.uea_encryption_mask > (1 << OSMO_UTRAN_UEA0) ? cm->vec->ck : NULL,</span><br><span style="color: hsl(120, 100%, 40%);">+   return ranap_new_msg_sec_mod_cmd2(cm->vec->ik,</span><br><span style="color: hsl(120, 100%, 40%);">+                                    use_encryption ? cm->vec->ck : NULL,</span><br><span>                                           RANAP_KeyStatus_new, 0x06, cm->utran.uea_encryption_mask);</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/+/26409">change 26409</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/+/26409"/><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: I14f4f9617f91ed17fb7614f218cb023a0231866d </div>
<div style="display:none"> Gerrit-Change-Number: 26409 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>