[sr-dev] git:master:417eb2a7: siptrace: fixed IPv6 without brackets

Daniel-Constantin Mierla miconda at gmail.com
Thu Jun 10 12:05:54 CEST 2021


Module: kamailio
Branch: master
Commit: 417eb2a7052a9354712663cca9e3bc075a3f69c0
URL: https://github.com/kamailio/kamailio/commit/417eb2a7052a9354712663cca9e3bc075a3f69c0

Author: Sergey Safarov <s.safarov at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at 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/417eb2a7052a9354712663cca9e3bc075a3f69c0.diff
Patch: https://github.com/kamailio/kamailio/commit/417eb2a7052a9354712663cca9e3bc075a3f69c0.patch

---

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);




More information about the sr-dev mailing list