[asterisk-commits] tcptls: Do not re-bind to wildcard on client creation. (asterisk[14])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Oct 10 08:07:20 CDT 2017


Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/6682 )

Change subject: tcptls: Do not re-bind to wildcard on client creation.
......................................................................

tcptls: Do not re-bind to wildcard on client creation.

Since ASTERISK-26922, this issue affected only those chan_sip which were
* enabled for dual-stack (bindaddr=::), and
* enabled for TCP (tcpenable=yes) and/or TLS (tlsenable=yes), and
* tried to register and/or invite a IPv4-only service,
* via TCP and/or TLS.
Now, ast_tcptls_client_create does not re-bind to [::] anymore.

ASTERISK-27324 #close

Change-Id: I4b242837bdeb1ec7130dc82505c6180a946fd9b5
---
M main/tcptls.c
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Joshua Colp: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved
  Jenkins2: Approved for Submit



diff --git a/main/tcptls.c b/main/tcptls.c
index 0d172f1..e237dc7 100644
--- a/main/tcptls.c
+++ b/main/tcptls.c
@@ -1147,7 +1147,8 @@
 
 	/* if a local address was specified, bind to it so the connection will
 	   originate from the desired address */
-	if (!ast_sockaddr_isnull(&desc->local_address)) {
+	if (!ast_sockaddr_isnull(&desc->local_address) &&
+	    !ast_sockaddr_is_any(&desc->local_address)) {
 		setsockopt(desc->accept_fd, SOL_SOCKET, SO_REUSEADDR, &x, sizeof(x));
 		if (ast_bind(desc->accept_fd, &desc->local_address)) {
 			ast_log(LOG_ERROR, "Unable to bind %s to %s: %s\n",

-- 
To view, visit https://gerrit.asterisk.org/6682
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-MessageType: merged
Gerrit-Change-Id: I4b242837bdeb1ec7130dc82505c6180a946fd9b5
Gerrit-Change-Number: 6682
Gerrit-PatchSet: 1
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-commits/attachments/20171010/65c9cde3/attachment-0001.html>


More information about the asterisk-commits mailing list