Browse code

xhttp: use proper function to set the ip addres of the fake via

- for ipv6 it has to be enclosed in between [ ]
- reported by Sergey Okhapkin

Daniel-Constantin Mierla authored on 20/02/2015 19:40:39
Showing 1 changed files
... ...
@@ -199,7 +199,7 @@ static char* xhttp_to_sip(sip_msg_t* msg, int* new_msg_len)
199 199
 	struct hostport hp;
200 200
 	struct dest_info dst;
201 201
 	
202
-	ip.s = ip_addr2a(&msg->rcv.src_ip);
202
+	ip.s = ip_addr2strz(&msg->rcv.src_ip);
203 203
 	ip.len = strlen(ip.s);
204 204
 	port.s = int2str(msg->rcv.src_port, &port.len);
205 205
 	hp.host = &ip;