Module: kamailio
Branch: 5.5
Commit: 0b4207846c18b3718bdc0f2914d5a7cdac4a9141
URL:
https://github.com/kamailio/kamailio/commit/0b4207846c18b3718bdc0f2914d5a7c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-09-17T10:24:19+02:00
sipdump: make dest ipv6 addresses without square brackets
(cherry picked from commit 0a61ec2f137414a7bfc2535dfe4df9b72e500cf8)
(cherry picked from commit d0300a9c69c522b7a6e3f69f21160df30f05f2ff)
---
Modified: src/modules/sipdump/sipdump_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/0b4207846c18b3718bdc0f2914d5a7c…
Patch:
https://github.com/kamailio/kamailio/commit/0b4207846c18b3718bdc0f2914d5a7c…
---
diff --git a/src/modules/sipdump/sipdump_mod.c b/src/modules/sipdump/sipdump_mod.c
index bc9fa88999..cde5d05bac 100644
--- a/src/modules/sipdump/sipdump_mod.c
+++ b/src/modules/sipdump/sipdump_mod.c
@@ -408,7 +408,8 @@ int sipdump_msg_sent(sr_event_param_t *evp)
isd.src_port = (int)evp->dst->send_sock->port_no;
}
su2ip_addr(&ip, &evp->dst->to);
- isd.dst_ip.len = ip_addr2sbufz(&ip, dstip_buf, IP_ADDR_MAX_STRZ_SIZE);
+ isd.dst_ip.len = ip_addr2sbuf(&ip, dstip_buf, IP_ADDR_MAX_STRZ_SIZE);
+ dstip_buf[isd.dst_ip.len] = '\0';
isd.dst_ip.s = dstip_buf;
isd.dst_port = (int)su_getport(&evp->dst->to);