<ul>
<li>fix regarding issue <a href="https://github.com/kamailio/kamailio/issues/379" class="issue-link" title="inline function suip2a() (ip_addr.h) not working for ipv6">#379</a>
</li>
<li>it makes sense to backport this fix to 4.2 and 4.3</li>
<li>Function suip2a() has never worked properly for IPv6 addresses before.
The passed buffer size 'sizeof(buf)-4' to ip6tosbuf() was 1 byte to small.
So ip6tosbuf() has never written any IPv6 ASCII string to the buffer and
therefor suip2a() always returned an empty IPv6 reference string ("[]").
Fixed this by changing passed buffer size to IP6_MAX_STR_SIZE.
For similarity also changed uncritical passed buffer size in call to
ip4tosbuf() to IP4_MAX_STR_SIZE.
The function suip2a() is only used by siptrace module when sip_trace()
script function is explicitly called on sending side e.g. in onsend_route
block.</li>
</ul>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/kamailio/kamailio/pull/381'>https://github.com/kamailio/kamailio/pull/381</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>core: fixed passed buffer size in suip2a()</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/381/files#diff-0">ip_addr.h</a>
    (4)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/kamailio/kamailio/pull/381.patch'>https://github.com/kamailio/kamailio/pull/381.patch</a></li>
  <li><a href='https://github.com/kamailio/kamailio/pull/381.diff'>https://github.com/kamailio/kamailio/pull/381.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/kamailio/kamailio/pull/381">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZT-1nmvWL6fYGiFj8j8rHYHXyb00ks5o_f9PgaJpZM4GVjJE.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/kamailio/kamailio/pull/381"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>