]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix detection of obsolete 'all' patterns
authorAmos Jeffries <squid3@treenet.co.nz>
Tue, 24 Nov 2009 02:36:29 +0000 (15:36 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Tue, 24 Nov 2009 02:36:29 +0000 (15:36 +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 bc9bbba84839c11885e52e12c8c9c623fd71f17d..982293be4421bfda2c49ddfec6113bbd3d909e4e 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.");