<p>fixeria has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-bts/+/22764">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">oml: use regular TLVP_PRES() in rx_oml_ipa_rsl_connect()<br><br>Both NM_ATT_IPACC_DST_IP and NM_ATT_IPACC_DST_IP_PORT are defined<br>as TLV_TYPE_FIXED, and NM_ATT_IPACC_STREAM_ID is TLV_TYPE_TV, so<br>the TLV parser already does check the length for us.<br><br>Change-Id: I1e493e552bb22bb42bb196ce71214e28d23fd19e<br>---<br>M src/common/oml.c<br>1 file changed, 3 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/64/22764/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 12875f4..d395d8f 100644</span><br><span>--- a/src/common/oml.c</span><br><span>+++ b/src/common/oml.c</span><br><span>@@ -1386,14 +1386,14 @@</span><br><span> </span><br><span>        uint8_t stream_id = 0;</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-      if (TLVP_PRES_LEN(tp, NM_ATT_IPACC_DST_IP, 4))</span><br><span style="color: hsl(120, 100%, 40%);">+        if (TLVP_PRESENT(tp, NM_ATT_IPACC_DST_IP))</span><br><span>           in.s_addr = tlvp_val32_unal(tp, NM_ATT_IPACC_DST_IP);</span><br><span>        else</span><br><span>                 in.s_addr = htonl(get_signlink_remote_ip(oml_link));</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-        if (TLVP_PRES_LEN(tp, NM_ATT_IPACC_DST_IP_PORT, 2))</span><br><span style="color: hsl(120, 100%, 40%);">+   if (TLVP_PRESENT(tp, NM_ATT_IPACC_DST_IP_PORT))</span><br><span>              port = ntohs(tlvp_val16_unal(tp, NM_ATT_IPACC_DST_IP_PORT));</span><br><span style="color: hsl(0, 100%, 40%);">-    if (TLVP_PRES_LEN(tp, NM_ATT_IPACC_STREAM_ID, 1))</span><br><span style="color: hsl(120, 100%, 40%);">+     if (TLVP_PRESENT(tp, NM_ATT_IPACC_STREAM_ID))</span><br><span>                stream_id = *TLVP_VAL(tp, NM_ATT_IPACC_STREAM_ID);</span><br><span> </span><br><span>       LOGP(DOML, LOGL_INFO, "%s: Rx IPA RSL CONNECT IP=%s PORT=%u STREAM=0x%02x\n",</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bts/+/22764">change 22764</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/+/22764"/><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: I1e493e552bb22bb42bb196ce71214e28d23fd19e </div>
<div style="display:none"> Gerrit-Change-Number: 22764 </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>