[sr-dev] git:master:27f19950: nathelper: consider IPv6 brackets when checking size for keepalive request

Daniel-Constantin Mierla miconda at gmail.com
Wed Nov 4 15:44:25 CET 2015


Module: kamailio
Branch: master
Commit: 27f19950f107a943c3bf9db1fddb1e4912136181
URL: https://github.com/kamailio/kamailio/commit/27f19950f107a943c3bf9db1fddb1e4912136181

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2015-11-04T15:44:16+01:00

nathelper: consider IPv6 brackets when checking size for keepalive request

---

Modified: modules/nathelper/sip_pinger.h

---

Diff:  https://github.com/kamailio/kamailio/commit/27f19950f107a943c3bf9db1fddb1e4912136181.diff
Patch: https://github.com/kamailio/kamailio/commit/27f19950f107a943c3bf9db1fddb1e4912136181.patch

---

diff --git a/modules/nathelper/sip_pinger.h b/modules/nathelper/sip_pinger.h
index 4b45f48..7cd5e0c 100644
--- a/modules/nathelper/sip_pinger.h
+++ b/modules/nathelper/sip_pinger.h
@@ -17,9 +17,6 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  *
- * History:
- * ---------
- * 2005-07-11  created (bogdan)
  */
 
 
@@ -137,6 +134,7 @@ static inline char* build_sipping(str *curi, struct socket_info* s, str *path,
 
 	if ( sipping_method.len + 1 + curi->len + s_len(" SIP/2.0"CRLF) +
 		s_len("Via: SIP/2.0/UDP ") + vaddr.len +
+				((s->address.af==AF_INET6)?2:0) +
 				1 + vport.len + s_len(";branch=0") +
 		(path->len ? (s_len(CRLF"Route: ") + path->len) : 0) +
 		s_len(CRLF"From: ") +  sipping_from.len + s_len(";tag=") +




More information about the sr-dev mailing list