- fix regarding issue #379 - it makes sense to backport this fix to 4.2 and 4.3 - 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. You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/381
-- Commit Summary --
* core: fixed passed buffer size in suip2a()
-- File Changes --
M ip_addr.h (4)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/381.patch https://github.com/kamailio/kamailio/pull/381.diff
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/381
Closed #381.
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/381#event-446039323
Applied the patch manually, the address inside it being a localhost. The commit message was simplified.
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/381#issuecomment-151277062