From 3a3883d7e37cd6dc149e5ebc52cad4fed6008a9e Mon Sep 17 00:00:00 2001 From: "Victor J. Orlikowski" Date: Wed, 1 Aug 2001 05:50:29 +0000 Subject: [PATCH] inet_addr and inet_network are not interchangable. Furthermore, use apr_inet_addr, rather than ap_inet_addr (though they map to the same thing). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89855 13f79535-47bb-0310-9956-ffa450edef68 --- modules/proxy/proxy_util.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c index c6ef5244cc..faa5074a73 100644 --- a/modules/proxy/proxy_util.c +++ b/modules/proxy/proxy_util.c @@ -276,11 +276,7 @@ PROXY_DECLARE(char *) if (!apr_isdigit(host[i]) && host[i] != '.') break; /* must be an IP address */ -#if defined(WIN32) || defined(NETWARE) || defined(TPF) || defined(BEOS) - if (host[i] == '\0' && (inet_addr(host) == -1)) -#else - if (host[i] == '\0' && (ap_inet_addr(host) == -1 || inet_network(host) == -1)) -#endif + if (host[i] == '\0' && (apr_inet_addr(host) == -1)) { return "Bad IP address in URL"; } @@ -630,7 +626,7 @@ PROXY_DECLARE(int) ap_proxy_is_ipaddr(struct dirconn_entry *This, apr_pool_t *p) long bits; /* if the address is given with an explicit netmask, use that */ - /* Due to a deficiency in ap_inet_addr(), it is impossible to parse */ + /* Due to a deficiency in apr_inet_addr(), it is impossible to parse */ /* "partial" addresses (with less than 4 quads) correctly, i.e. */ /* 192.168.123 is parsed as 192.168.0.123, which is not what I want. */ /* I therefore have to parse the IP address manually: */ -- 2.40.0