Module: kamailio
Branch: 5.4
Commit: 4f02ec387cf9f46cc83ec6fea0df0a17ab7f08a5
URL:
https://github.com/kamailio/kamailio/commit/4f02ec387cf9f46cc83ec6fea0df0a1…
Author: Sergey Safarov <s.safarov(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-07-29T10:46:07+02:00
siptrace: fixed IPv6 without brackets
more details GH #2775
(cherry picked from commit 417eb2a7052a9354712663cca9e3bc075a3f69c0)
(cherry picked from commit 903e41468a00edeff52cbf1e3c0053c82860c92c)
---
Modified: src/modules/siptrace/siptrace.c
---
Diff:
https://github.com/kamailio/kamailio/commit/4f02ec387cf9f46cc83ec6fea0df0a1…
Patch:
https://github.com/kamailio/kamailio/commit/4f02ec387cf9f46cc83ec6fea0df0a1…
---
diff --git a/src/modules/siptrace/siptrace.c b/src/modules/siptrace/siptrace.c
index fbeb3fb764..afd8bfef24 100644
--- a/src/modules/siptrace/siptrace.c
+++ b/src/modules/siptrace/siptrace.c
@@ -2061,7 +2061,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;
@@ -2071,7 +2071,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);