<p>fixeria has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-bts/+/22765">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">oml: ensure that IPA RSL Connect ACK/NACK contains all IEs<br><br>All IEs in the BSC originated message are optional, so we assume<br>default values for them.  Let's reflect them all in the ACK/NACK.<br><br>Change-Id: I5c73e83daad0cea07b9cb674c393e0bfc6268a61<br>Related: OS#3791<br>---<br>M src/common/oml.c<br>1 file changed, 14 insertions(+), 3 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/65/22765/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/common/oml.c b/src/common/oml.c</span><br><span>index d395d8f..c32260b 100644</span><br><span>--- a/src/common/oml.c</span><br><span>+++ b/src/common/oml.c</span><br><span>@@ -442,14 +442,15 @@</span><br><span>           foh->msg_type += 2; /* nack */</span><br><span>            /* add cause */</span><br><span>              msgb_tv_put(msg, NM_ATT_NACK_CAUSES, cause);</span><br><span style="color: hsl(0, 100%, 40%);">-            /* update the length as we just made the message larger */</span><br><span style="color: hsl(0, 100%, 40%);">-              struct abis_om_hdr *omh = (struct abis_om_hdr *) msgb_l2(msg);</span><br><span style="color: hsl(0, 100%, 40%);">-          omh->length = msgb_l3len(msg);</span><br><span>    } else {</span><br><span>             LOGPFOH(DOML, LOGL_DEBUG, foh, "Sending FOM ACK.\n");</span><br><span>              foh->msg_type++; /* ack */</span><br><span>        }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ /* ensure that the message length is up to date */</span><br><span style="color: hsl(120, 100%, 40%);">+    struct abis_om_hdr *omh = (struct abis_om_hdr *) msgb_l2(msg);</span><br><span style="color: hsl(120, 100%, 40%);">+        omh->length = msgb_l3len(msg);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>  /* we cannot use oml_send_msg() as we already have the OML header */</span><br><span>         if (abis_oml_sendmsg(msg) != 0)</span><br><span>              LOGPFOH(DOML, LOGL_ERROR, foh, "Failed to send ACK/NACK\n");</span><br><span>@@ -1406,6 +1407,16 @@</span><br><span>              trx->rsl_tei = stream_id;</span><br><span>                 rc = e1inp_ipa_bts_rsl_connect_n(oml_link->ts->line, inet_ntoa(in), port, trx->nr);</span><br><span>         }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   /* The ACK/NACK is expected to contain all IEs */</span><br><span style="color: hsl(120, 100%, 40%);">+     if (!TLVP_PRESENT(tp, NM_ATT_IPACC_DST_IP)) /* TV32 */</span><br><span style="color: hsl(120, 100%, 40%);">+                msgb_tv_fixed_put(msg, NM_ATT_IPACC_DST_IP, sizeof(in),</span><br><span style="color: hsl(120, 100%, 40%);">+                                 (const uint8_t *) &in);</span><br><span style="color: hsl(120, 100%, 40%);">+ if (!TLVP_PRESENT(tp, NM_ATT_IPACC_DST_IP_PORT)) /* TV16 */</span><br><span style="color: hsl(120, 100%, 40%);">+           msgb_tv16_put(msg, NM_ATT_IPACC_DST_IP_PORT, port);</span><br><span style="color: hsl(120, 100%, 40%);">+   if (!TLVP_PRESENT(tp, NM_ATT_IPACC_STREAM_ID)) /* TV */</span><br><span style="color: hsl(120, 100%, 40%);">+               msgb_tv_put(msg, NM_ATT_IPACC_STREAM_ID, stream_id);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>       if (rc < 0) {</span><br><span>             LOGP(DOML, LOGL_ERROR, "%s: Error in abis_open(RSL): %d\n", trx_name, rc);</span><br><span>                 return oml_fom_ack_nack(msg, NM_NACK_CANT_PERFORM);</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bts/+/22765">change 22765</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/+/22765"/><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: I5c73e83daad0cea07b9cb674c393e0bfc6268a61 </div>
<div style="display:none"> Gerrit-Change-Number: 22765 </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>