]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
PR: 27542
authorJim Jagielski <jim@apache.org>
Mon, 29 Mar 2004 17:47:15 +0000 (17:47 +0000)
committerJim Jagielski <jim@apache.org>
Mon, 29 Mar 2004 17:47:15 +0000 (17:47 +0000)
Obtained from:
Submitted by: white@extrasy.net (Alexander Prohorenko)
Reviewed by: jeff, jim

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@103191 13f79535-47bb-0310-9956-ffa450edef68

src/CHANGES
src/modules/proxy/proxy_http.c

index 4c69677f349c59a6443748f560e0a61f532c6751..73d8f497423d6dadeb6c187ada6a46399c3dbdbb 100644 (file)
@@ -1,5 +1,9 @@
 Changes with Apache 1.3.30
 
+  *) Reinit socket to allow mod_proxy to continue to try
+     connections when invalid IPs are accessed. PR 27542.
+     [Alexander Prohorenko <white extrasy.net>]
+   
   *) SECURITY: CAN-2004-0174 (cve.mitre.org)
      Fix starvation issue on listening sockets where a short-lived
      connection on a rarely-accessed listening socket will cause a
index 595a66d7748cb15ab8414e47fe1da9c0c3d187ee..020f5c5b7d914fa23b2d5575265e7beb4fb9fc05 100644 (file)
@@ -225,6 +225,11 @@ int ap_proxy_http_handler(request_rec *r, cache_req *c, char *url,
             i = ap_proxy_doconnect(sock, &server, r);
             if (i == 0)
                 break;
+            /*
+             * Even if the connection was unsuccesful we should
+             * reinit the socket
+             */
+            sock = ap_psocket_ex(p, PF_INET, SOCK_STREAM, IPPROTO_TCP, 1);
         }
     }
 #else
@@ -235,6 +240,11 @@ int ap_proxy_http_handler(request_rec *r, cache_req *c, char *url,
         i = ap_proxy_doconnect(sock, &server, r);
         if (i == 0)
             break;
+        /*
+         * Even if the connection was unsuccesful we should
+         * reinit the socket
+         */
+        sock = ap_psocket_ex(p, PF_INET, SOCK_STREAM, IPPROTO_TCP, 1);
         j++;
     }
 #endif