Browse code

core: remove condition for ipv6 outbound socket to build via header

(cherry picked from commit e6abb9302c8b127b7ac15cd7e24075845e271bf1)
(cherry picked from commit 5c709d7cc8e016e9354d34fc4002c1a49e240064)

Surendra Tiwari authored on 01/11/2017 15:34:32
Showing 1 changed files
... ...
@@ -2781,10 +2781,9 @@ char* via_builder( unsigned int *len,
2781 2781
 		pkg_free(line_buf);
2782 2782
 		return 0;
2783 2783
 	}
2784
-	/* add [] only if ipv6 and outbound socket address is used;
2784
+	/* add [] only if ipv6 address is used;
2785 2785
 	 * if using pre-set no check is made */
2786
-	if ((send_sock->address.af==AF_INET6) &&
2787
-		(address_str==&(send_sock->address_str))) {
2786
+	if (send_sock->address.af==AF_INET6) {
2788 2787
 		line_buf[via_prefix_len]='[';
2789 2788
 		line_buf[via_prefix_len+1+address_str->len]=']';
2790 2789
 		extra_len=1;