<p>Harald Welte <strong>merged</strong> this change.</p><p><a href="https://gerrit.osmocom.org/10545">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">fix decoding of incoming X.213 NSAP addr<br><br>Fix ranap_transp_layer_addr_decode() to test == 7 instead of > 7: If a femto<br>cell sends its Transport Layer Address as X.213 NSAP IPv4, we receive 3 header<br>bytes and four IP-address bytes, so the length is exactly 7.<br><br>This function is very vague on numerous other decoding details, but this patch<br>only fixes the vital length check that makes 3G usable with X.213 NSAP.<br><br>Related: OS#3420<br>Change-Id: I2cd1b2d8e1c1ae707cfc0dc7961a2b31ecdf29e0<br>---<br>M src/iu_helpers.c<br>1 file changed, 1 insertion(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/iu_helpers.c b/src/iu_helpers.c</span><br><span>index 5e78293..39b0521 100644</span><br><span>--- a/src/iu_helpers.c</span><br><span>+++ b/src/iu_helpers.c</span><br><span>@@ -109,7 +109,7 @@</span><br><span>   buf = trasp_layer_addr->buf;</span><br><span>      len = trasp_layer_addr->size;</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-    if (buf[0] == 0x35 && len > 7)</span><br><span style="color: hsl(120, 100%, 40%);">+     if (buf[0] == 0x35 && len == 7)</span><br><span>              rc = inet_ntop(AF_INET, buf + 3, addr, addr_len);</span><br><span>    else if (len > 3)</span><br><span>                 rc = inet_ntop(AF_INET, buf, addr, addr_len);</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/10545">change 10545</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/10545"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-iuh </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I2cd1b2d8e1c1ae707cfc0dc7961a2b31ecdf29e0 </div>
<div style="display:none"> Gerrit-Change-Number: 10545 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>