[sr-dev] git:5.4:4f02ec38: siptrace: fixed IPv6 without brackets
Daniel-Constantin Mierla
miconda at gmail.com
Thu Jul 29 10:57:42 CEST 2021
Module: kamailio
Branch: 5.4
Commit: 4f02ec387cf9f46cc83ec6fea0df0a17ab7f08a5
URL: https://github.com/kamailio/kamailio/commit/4f02ec387cf9f46cc83ec6fea0df0a17ab7f08a5
Author: Sergey Safarov <s.safarov at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at 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/4f02ec387cf9f46cc83ec6fea0df0a17ab7f08a5.diff
Patch: https://github.com/kamailio/kamailio/commit/4f02ec387cf9f46cc83ec6fea0df0a17ab7f08a5.patch
---
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);
More information about the sr-dev
mailing list