]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Regression Fix: ident open failure: Address already in use
authorAmos Jeffries <squid3@treenet.co.nz>
Sat, 18 Apr 2009 01:39:58 +0000 (13:39 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Sat, 18 Apr 2009 01:39:58 +0000 (13:39 +1200)
Alterations in 3.1 caused the ident port opening to attept binding 3128
which was already opened by Squid.

This returns to the previous random port selection.

src/ident.cc

index f8d942344d371d443ffd4fa468ff9cda783d0f9a..061cb6b20a95501551b7c714a90276d102633b1c 100644 (file)
@@ -220,9 +220,12 @@ identStart(IpAddress &me, IpAddress &my_peer, IDCB * callback, void *data)
         return;
     }
 
+    IpAddress addr = me;
+    addr.SetPort(0); // NP: use random port for secure outbound to IDENT_PORT
+
     fd = comm_open_listener(SOCK_STREAM,
                    IPPROTO_TCP,
-                   me,
+                   addr,
                    COMM_NONBLOCKING,
                    "ident");