From: Amos Jeffries Date: Sun, 12 Oct 2008 08:10:11 +0000 (+1300) Subject: Author: Klaus Singvogel X-Git-Tag: SQUID_3_2_0_1~1415 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a81416bc7fbd5b14b71174185390dba8e44e6300;p=thirdparty%2Fsquid.git Author: Klaus Singvogel Bug 2483: bind() called before connect() --- 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);