chuck 96/06/10 10:55:22
Modified: src mod_proxy.c
Log:
Submitted by: Chuck (I hope this is right) Murcko
Changed host2addr() function back to using inet_addr() for IP address
lookups, but in a way that works. Removed inet_aton() call because it's
too new for some systems.
Revision Changes Path
1.25 +3 -1 apache/src/mod_proxy.c
Index: mod_proxy.c
===================================================================
RCS file: /export/home/cvs/apache/src/mod_proxy.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -C3 -r1.24 -r1.25
*** mod_proxy.c 1996/06/08 21:21:29 1.24
--- mod_proxy.c 1996/06/10 17:55:19 1.25
***************
*** 2188,2193 ****
--- 2188,2194 ----
host2addr(const char *host, struct in_addr *addr)
{
int i;
+ unsigned long ipaddr;
for (i=0; host[i] != '\0'; i++)
if (!isdigit(host[i]) && host[i] != '.')
***************
*** 2202,2209 ****
memcpy(addr, hp->h_addr, sizeof(struct in_addr));
} else
{
! if (!inet_aton(host, addr))
return "Bad IP address";
}
return NULL;
}
--- 2203,2211 ----
memcpy(addr, hp->h_addr, sizeof(struct in_addr));
} else
{
! if ((ipaddr = inet_addr(host)) == -1)
return "Bad IP address";
+ memcpy(addr, &ipaddr, sizeof(unsigned long));
}
return NULL;
}