Browse code

siptrace: fixed IPv6 without brackets

more details GH #2775

Sergey Safarov authored on 10/06/2021 09:17:54
Showing 1 changed files
... ...
@@ -2133,7 +2133,7 @@ int siptrace_net_data_recv(sr_event_param_t *evp)
2133 2133
 
2134 2134
 	sto.fromip.len = snprintf(sto.fromip_buff, SIPTRACE_ADDR_MAX, "%s:%s:%d",
2135 2135
 			siptrace_proto_name(nd->rcv->proto),
2136
-			ip_addr2a(&nd->rcv->src_ip), (int)nd->rcv->src_port);
2136
+			ip_addr2strz(&nd->rcv->src_ip), (int)nd->rcv->src_port);
2137 2137
 	if(sto.fromip.len<0 || sto.fromip.len>=SIPTRACE_ADDR_MAX) {
2138 2138
 		LM_ERR("failed to format toip buffer (%d)\n", sto.fromip.len);
2139 2139
 		sto.fromip.s = SIPTRACE_ANYADDR;
... ...
@@ -2143,7 +2143,7 @@ int siptrace_net_data_recv(sr_event_param_t *evp)
2143 2143
 	}
2144 2144
 
2145 2145
 	sto.toip.len = snprintf(sto.toip_buff, SIPTRACE_ADDR_MAX, "%s:%s:%d",
2146
-			siptrace_proto_name(nd->rcv->proto), ip_addr2a(&nd->rcv->dst_ip),
2146
+			siptrace_proto_name(nd->rcv->proto), ip_addr2strz(&nd->rcv->dst_ip),
2147 2147
 			(int)nd->rcv->dst_port);
2148 2148
 	if(sto.toip.len<0 || sto.toip.len>=SIPTRACE_ADDR_MAX) {
2149 2149
 		LM_ERR("failed to format toip buffer (%d)\n", sto.toip.len);