fielding 97/09/14 00:34:38
Modified: src CHANGES
src/modules/proxy proxy_util.c
Log:
Fixed error in proxy_util.c when looping through multiple host IP
addresses.
PR: 974
Submitted by: Lars Eilebrecht
Reviewed by: Roy Fielding (and many others)
Revision Changes Path
1.440 +3 -5 apachen/src/CHANGES
Index: CHANGES
===================================================================
RCS file: /export/home/cvs/apachen/src/CHANGES,v
retrieving revision 1.439
retrieving revision 1.440
diff -u -r1.439 -r1.440
--- CHANGES 1997/09/12 21:40:04 1.439
+++ CHANGES 1997/09/14 07:34:35 1.440
@@ -1,5 +1,8 @@
Changes with Apache 1.3b1
+ *) Fixed error in proxy_util.c when looping through multiple host IP
+ addresses. [Lars Eilebrecht] PR#974
+
*) If BUFFERED_LOGS is defined then mod_log_config will do atomic
buffered writes -- that is, it will buffer up to PIPE_BUF (i.e. 4k)
bytes before writing, but it will never split a log entry across a
@@ -177,11 +180,6 @@
*) Fixed proxy-pass-through feature of mod_rewrite; Added error logging
information for case where proxy module is not available. [Marc Slemko]
-
- *) The request to a remote proxy was mangled if it was generated as the
- result of a ProxyPass directive. URL schemes other than http:// were not
- supported when ProxyRemote was used. PR#260, PR#656, PR#699, PR#713,
- PR#812 [Lars Eilebrecht]
*) PORT: Apache has need for mutexes to serialize its children around
accept. In prior versions either fcntl file locking or flock file
1.30 +5 -1 apachen/src/modules/proxy/proxy_util.c
Index: proxy_util.c
===================================================================
RCS file: /export/home/cvs/apachen/src/modules/proxy/proxy_util.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- proxy_util.c 1997/09/06 14:16:58 1.29
+++ proxy_util.c 1997/09/14 07:34:38 1.30
@@ -955,6 +955,7 @@
int ip_addr[4];
struct in_addr addr;
struct in_addr *ip_list;
+ char **ip_listptr;
const char *found;
const char *host = proxy_get_host_of_request(r);
@@ -1005,7 +1006,9 @@
found = host;
/* Try to deal with multiple IP addr's for a host */
- for (ip_list = (struct in_addr *) *the_host.h_addr_list;
ip_list->s_addr != 0UL; ++ip_list)
+ for (ip_listptr=the_host.h_addr_list; *ip_listptr; ++ip_listptr)
+ {
+ ip_list = (struct in_addr *) *ip_listptr;
if (This->addr.s_addr == (ip_list->s_addr & This->mask.s_addr))
{
#if DEBUGGING
@@ -1023,6 +1026,7 @@
fprintf(stderr,"%s\n", inet_ntoa(This->mask));
}
#endif
+ }
}
/* Use net math to determine if a host lies in a subnet */