]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: Klaus Singvogel <kssingvo@suse.de>
authorAmos Jeffries <squid3@treenet.co.nz>
Sun, 12 Oct 2008 08:10:11 +0000 (21:10 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 12 Oct 2008 08:10:11 +0000 (21:10 +1300)
Bug 2483: bind() called before connect()

src/comm.cc

index 98d262699ace2a6f5b3ed6146995950cb543c19f..2b09e3c99e684693cba1df6f83e355d46c019a3b 100644 (file)
@@ -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);