]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
DW:
authorwessels <>
Fri, 11 Aug 2000 03:44:44 +0000 (03:44 +0000)
committerwessels <>
Fri, 11 Aug 2000 03:44:44 +0000 (03:44 +0000)
 - 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.

src/acl.cc
src/structs.h

index 13d76a3287745cefe78b4ff8a38cc2e3d641ca81..e818d56c16a3cd059e3b766e4c38a6a7cb169dc9 100644 (file)
@@ -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) {
index cccc644c8dc6ae3b9866d8eda91c6ac5c768349f..fcd8c8b3e47cf215bf5e6a235d72081ca153ad29 100644 (file)
@@ -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 {