Module: kamailio
Branch: master
Commit: e6abb9302c8b127b7ac15cd7e24075845e271bf1
URL:
https://github.com/kamailio/kamailio/commit/e6abb9302c8b127b7ac15cd7e240758…
Author: Surendra Tiwari <surendratiwari3(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-11-01T16:34:32+01:00
core: remove condition for ipv6 outbound socket to build via header
---
Modified: src/core/msg_translator.c
---
Diff:
https://github.com/kamailio/kamailio/commit/e6abb9302c8b127b7ac15cd7e240758…
Patch:
https://github.com/kamailio/kamailio/commit/e6abb9302c8b127b7ac15cd7e240758…
---
diff --git a/src/core/msg_translator.c b/src/core/msg_translator.c
index e58356999d..3a24aa077a 100644
--- a/src/core/msg_translator.c
+++ b/src/core/msg_translator.c
@@ -2785,10 +2785,9 @@ char* via_builder( unsigned int *len,
pkg_free(line_buf);
return 0;
}
- /* add [] only if ipv6 and outbound socket address is used;
+ /* add [] only if ipv6 address is used;
* if using pre-set no check is made */
- if ((send_sock->address.af==AF_INET6) &&
- (address_str==&(send_sock->address_str))) {
+ if (send_sock->address.af==AF_INET6) {
line_buf[via_prefix_len]='[';
line_buf[via_prefix_len+1+address_str->len]=']';
extra_len=1;