From: Jim Jagielski Date: Mon, 29 Mar 2004 17:47:15 +0000 (+0000) Subject: PR: 27542 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cc6ff14bab35abef1bf11b25ce51f2fb32420ce6;p=thirdparty%2Fapache%2Fhttpd.git PR: 27542 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 --- diff --git a/src/CHANGES b/src/CHANGES index 4c69677f349..73d8f497423 100644 --- a/src/CHANGES +++ b/src/CHANGES @@ -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 ] + *) 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 diff --git a/src/modules/proxy/proxy_http.c b/src/modules/proxy/proxy_http.c index 595a66d7748..020f5c5b7d9 100644 --- a/src/modules/proxy/proxy_http.c +++ b/src/modules/proxy/proxy_http.c @@ -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