[sr-dev] git:master:5c1a9df4: xhttp: use proper function to set the ip addres of the fake via

Daniel-Constantin Mierla miconda at gmail.com
Fri Feb 20 20:43:44 CET 2015


Module: kamailio
Branch: master
Commit: 5c1a9df4fc8bd72f44066bcef13f381f01cd9d07
URL: https://github.com/kamailio/kamailio/commit/5c1a9df4fc8bd72f44066bcef13f381f01cd9d07

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2015-02-20T20:40:39+01:00

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

---

Modified: modules/xhttp/xhttp_mod.c

---

Diff:  https://github.com/kamailio/kamailio/commit/5c1a9df4fc8bd72f44066bcef13f381f01cd9d07.diff
Patch: https://github.com/kamailio/kamailio/commit/5c1a9df4fc8bd72f44066bcef13f381f01cd9d07.patch

---

diff --git a/modules/xhttp/xhttp_mod.c b/modules/xhttp/xhttp_mod.c
index eff079a..9085af3 100644
--- a/modules/xhttp/xhttp_mod.c
+++ b/modules/xhttp/xhttp_mod.c
@@ -199,7 +199,7 @@ static char* xhttp_to_sip(sip_msg_t* msg, int* new_msg_len)
 	struct hostport hp;
 	struct dest_info dst;
 	
-	ip.s = ip_addr2a(&msg->rcv.src_ip);
+	ip.s = ip_addr2strz(&msg->rcv.src_ip);
 	ip.len = strlen(ip.s);
 	port.s = int2str(msg->rcv.src_port, &port.len);
 	hp.host = &ip;




More information about the sr-dev mailing list