From a81416bc7fbd5b14b71174185390dba8e44e6300 Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Sun, 12 Oct 2008 21:10:11 +1300 Subject: [PATCH] Author: Klaus Singvogel Bug 2483: bind() called before connect() --- src/comm.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/comm.cc b/src/comm.cc index 98d262699a..2b09e3c99e 100644 --- a/src/comm.cc +++ b/src/comm.cc @@ -778,7 +778,8 @@ comm_openex(int sock_type, comm_set_transparent(new_socket); } - if (!addr.IsNoAddr()) + /* only re-bind if given a valid routable address. */ + if (!addr.IsAnyAddr() && !addr.IsNoAddr()) { if (commBind(new_socket, *AI) != COMM_OK) { comm_close(new_socket); -- 2.47.2