]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix detection of obsolete 'all' patterns
authorAmos Jeffries <squid3@treenet.co.nz>
Mon, 30 Nov 2009 10:27:02 +0000 (23:27 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 30 Nov 2009 10:27:02 +0000 (23:27 +1300)
A little bit overly enthusiastic on the additions...
 * 0.0.0.0 is a /32 not /0
 * 0->N is 'all', not 0->0

src/acl/Ip.cc

index a899aa5c613a0020d35225024c8158e7c4584a0b..2c517ed5d51ad8032e85f4980dab68ec4fa63ba5 100644 (file)
@@ -277,7 +277,7 @@ acl_ip_data::FactoryParse(const char *t)
     /* Detect some old broken strings equivalent to 'all'.
      * treat them nicely. But be loud until its fixed.  */
     if (strcasecmp(t, "0/0") == 0 || strcasecmp(t, "0.0.0.0/0") == 0 || strcasecmp(t, "0.0.0.0/0.0.0.0") == 0 ||
-            strcasecmp(t, "0.0.0.0") == 0 || strcasecmp(t, "0.0.0.0-0.0.0.0") == 0 || strcasecmp(t, "0.0.0.0-0.0.0.0/0") == 0) {
+            strcasecmp(t, "0.0.0.0-255.255.255.255") == 0 || strcasecmp(t, "0.0.0.0-0.0.0.0/0") == 0) {
 
         debugs(28,DBG_CRITICAL, "ERROR: '" << t << "' needs to be replaced by the term 'all'.");
         debugs(28,DBG_CRITICAL, "SECURITY NOTICE: Overriding config setting. Using 'all' instead.");