From: wessels <> Date: Fri, 11 Aug 2000 03:44:44 +0000 (+0000) Subject: DW: X-Git-Tag: SQUID_3_0_PRE1~1875 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=20a4484eea868daeb27bfa515861be457b080059;p=thirdparty%2Fsquid.git DW: - The code that scans ACL tokens for IP addresses and hostnames couldn't tell that "123.foo.com" is a hostname rather than an IP address. --- diff --git a/src/acl.cc b/src/acl.cc index 13d76a3287..e818d56c16 100644 --- a/src/acl.cc +++ b/src/acl.cc @@ -1,6 +1,6 @@ /* - * $Id: acl.cc,v 1.219 2000/05/16 07:09:33 wessels Exp $ + * $Id: acl.cc,v 1.220 2000/08/10 21:44:44 wessels Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Duane Wessels @@ -403,7 +403,7 @@ decode_addr(const char *asc, struct in_addr *addr, struct in_addr *mask) #define SCAN_ACL1 "%[0123456789.]-%[0123456789.]/%[0123456789.]" #define SCAN_ACL2 "%[0123456789.]-%[0123456789.]" #define SCAN_ACL3 "%[0123456789.]/%[0123456789.]" -#define SCAN_ACL4 "%[0123456789.]" +#define SCAN_ACL4 "%[0123456789.]%c" static acl_ip_data * aclParseIpData(const char *t) @@ -416,6 +416,7 @@ aclParseIpData(const char *t) acl_ip_data **Q; struct hostent *hp; char **x; + char c; debug(28, 5) ("aclParseIpData: %s\n", t); if (!strcasecmp(t, "all")) { q->addr1.s_addr = 0; @@ -429,7 +430,7 @@ aclParseIpData(const char *t) mask[0] = '\0'; } else if (sscanf(t, SCAN_ACL3, addr1, mask) == 2) { addr2[0] = '\0'; - } else if (sscanf(t, SCAN_ACL4, addr1) == 1) { + } else if (sscanf(t, SCAN_ACL4, addr1, &c) == 1) { addr2[0] = '\0'; mask[0] = '\0'; } else if (sscanf(t, "%[^/]/%s", addr1, mask) == 2) { diff --git a/src/structs.h b/src/structs.h index cccc644c8d..fcd8c8b3e4 100644 --- a/src/structs.h +++ b/src/structs.h @@ -1,6 +1,6 @@ /* - * $Id: structs.h,v 1.347 2000/07/13 06:13:43 wessels Exp $ + * $Id: structs.h,v 1.349 2000/08/10 21:44:44 wessels Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -1418,6 +1418,7 @@ struct _SwapDir { STLOGCLEANDONE *done; void *state; } clean; + int writes_since_clean; } log; void *fsdata; }; @@ -1441,6 +1442,7 @@ struct _request_flags { #endif unsigned int accelerated:1; unsigned int internal:1; + unsigned int we_dont_do_ranges:1; }; struct _link_list {