summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins2 <jenkins2@gerrit.asterisk.org>2017-10-10 08:07:20 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2017-10-10 08:07:20 -0500
commit33a53bb10056c085c6eeba9d6fcf4c0cf69c337b (patch)
treee4423729aef48d199ef3a910858cb98cec52b5d5
parent9bb9b2f53f58bac02cdd8dbbd2ed0e42cda456e0 (diff)
parent20fd595890a5c02d5656e4627a2fd6e36986a84a (diff)
Merge "tcptls: Do not re-bind to wildcard on client creation." into 14
-rw-r--r--main/tcptls.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/main/tcptls.c b/main/tcptls.c
index 0d172f149..e237dc7bb 100644
--- a/main/tcptls.c
+++ b/main/tcptls.c
@@ -1147,7 +1147,8 @@ struct ast_tcptls_session_instance *ast_tcptls_client_create(struct ast_tcptls_s
/* 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",