<p>Harald Welte <strong>merged</strong> this change.</p><p><a href="https://gerrit.osmocom.org/11167">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 transport layer addr again, for nano3g<br><br>The nano3G sends the RAB Assignment Response's Transport Layer Address in X.213<br>NSAP padded to 20 bytes (160bit). Do not interpret it as 4-byte IP address,<br>which currently breaks nano3G voice calls (wrong RTP IP address).<br><br>Recent commit I2cd1b2d8e1c1ae707cfc0dc7961a2b31ecdf29e0 fixed decoding of X.213<br>NSAP that is exactly seven bytes, but broke decoding of the padded version from<br>the nano3G.<br><br>A proper X.213 NSAP decoding would still be more welcome than this patching<br>back and forth, but this is (another) quick fix without spending too much time<br>on it.<br><br>Related: OS#3420<br>Change-Id: I0ad8bce6fcfd3829394c39490058c1ab85cdfde3<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 39b0521..bf82fde 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/11167">change 11167</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/11167"/><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: I0ad8bce6fcfd3829394c39490058c1ab85cdfde3 </div>
<div style="display:none"> Gerrit-Change-Number: 11167 </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>