core: remove condition for ipv6 outbound socket to build via header
authorSurendra Tiwari <surendratiwari3@gmail.com>
Wed, 1 Nov 2017 15:34:32 +0000 (16:34 +0100)
committerDaniel-Constantin Mierla <miconda@gmail.com>
Wed, 1 Nov 2017 15:34:32 +0000 (16:34 +0100)
src/core/msg_translator.c

index e583569..3a24aa0 100644 (file)
@@ -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;