Browse code

nathelper: consider IPv6 brackets when checking size for keepalive request

(cherry picked from commit 27f19950f107a943c3bf9db1fddb1e4912136181)
(cherry picked from commit 8d82eb9a43885a1c524c5a53155f3299ce55fbb7)

Daniel-Constantin Mierla authored on 18/12/2015 11:12:21
Showing 1 changed files
... ...
@@ -126,6 +126,7 @@ static inline char* build_sipping(str *curi, struct socket_info* s, str *path,
126 126
 
127 127
 	if ( sipping_method.len + 1 + curi->len + s_len(" SIP/2.0"CRLF) +
128 128
 		s_len("Via: SIP/2.0/UDP ") + s->address_str.len +
129
+				((s->address.af==AF_INET6)?2:0) +
129 130
 				1 + s->port_no_str.len + s_len(";branch=0") +
130 131
 		(path->len ? (s_len(CRLF"Route: ") + path->len) : 0) +
131 132
 		s_len(CRLF"From: ") +  sipping_from.len + s_len(";tag=") +