Module: kamailio
Branch: master
Commit: 417eb2a7052a9354712663cca9e3bc075a3f69c0
URL:
https://github.com/kamailio/kamailio/commit/417eb2a7052a9354712663cca9e3bc0…
Author: Sergey Safarov <s.safarov(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-06-10T12:05:49+02:00
siptrace: fixed IPv6 without brackets
more details GH #2775
---
Modified: src/modules/siptrace/siptrace.c
---
Diff:
https://github.com/kamailio/kamailio/commit/417eb2a7052a9354712663cca9e3bc0…
Patch:
https://github.com/kamailio/kamailio/commit/417eb2a7052a9354712663cca9e3bc0…
---
diff --git a/src/modules/siptrace/siptrace.c b/src/modules/siptrace/siptrace.c
index 89a0618d02..13cc220457 100644
--- a/src/modules/siptrace/siptrace.c
+++ b/src/modules/siptrace/siptrace.c
@@ -2133,7 +2133,7 @@ int siptrace_net_data_recv(sr_event_param_t *evp)
sto.fromip.len = snprintf(sto.fromip_buff, SIPTRACE_ADDR_MAX, "%s:%s:%d",
siptrace_proto_name(nd->rcv->proto),
- ip_addr2a(&nd->rcv->src_ip), (int)nd->rcv->src_port);
+ ip_addr2strz(&nd->rcv->src_ip), (int)nd->rcv->src_port);
if(sto.fromip.len<0 || sto.fromip.len>=SIPTRACE_ADDR_MAX) {
LM_ERR("failed to format toip buffer (%d)\n", sto.fromip.len);
sto.fromip.s = SIPTRACE_ANYADDR;
@@ -2143,7 +2143,7 @@ int siptrace_net_data_recv(sr_event_param_t *evp)
}
sto.toip.len = snprintf(sto.toip_buff, SIPTRACE_ADDR_MAX, "%s:%s:%d",
- siptrace_proto_name(nd->rcv->proto), ip_addr2a(&nd->rcv->dst_ip),
+ siptrace_proto_name(nd->rcv->proto), ip_addr2strz(&nd->rcv->dst_ip),
(int)nd->rcv->dst_port);
if(sto.toip.len<0 || sto.toip.len>=SIPTRACE_ADDR_MAX) {
LM_ERR("failed to format toip buffer (%d)\n", sto.toip.len);