Index: acl.c =================================================================== RCS file: /surf1/CVS/squid/src/acl.c,v retrieving revision 1.197.2.9 retrieving revision 1.204 diff -u -r1.197.2.9 -r1.204 --- acl.c 1999年05月19日 15:58:31 1.197.2.9 +++ acl.c 1999年05月19日 19:57:34 1.204 @@ -1890,21 +1891,33 @@ { const char *d1 = data; const char *d2 = n->data; - int l1 = strlen(d1); - int l2 = strlen(d2); + int l1; + int l2; + while ('.' == *d1) + d1++; + while ('.' == *d2) + d2++; + l1 = strlen(d1); + l2 = strlen(d2); while (d1[l1] == d2[l2]) { if ((l1 == 0) && (l2 == 0)) return 0; /* d1 == d2 */ - if (l1-- == 0) { - debug(28, 0) ("WARNING: %s is a subdomain of %s\n", d1, d2); - debug(28, 0) ("WARNING: This may break Splay tree searching\n"); - debug(28, 0) ("WARNING: You should remove '%s' from the ACL named '%s'\n", d2, AclMatchedName); + l1--; + l2--; + if (0 == l1) { + if ('.' == d2[l2 - 1]) { + debug(28, 0) ("WARNING: %s is a subdomain of %s\n", d1, d2); + debug(28, 0) ("WARNING: This may break Splay tree searching\n"); + debug(28, 0) ("WARNING: You should remove '%s' from the ACL named '%s'\n", d2, AclMatchedName); + } return -1; /* d1 < d2 */ } - if (l2-- == 0) { - debug(28, 0) ("WARNING: %s is a subdomain of %s\n", d2, d1); - debug(28, 0) ("WARNING: This may break Splay tree searching\n"); - debug(28, 0) ("WARNING: You should remove '%s' from the ACL named '%s'\n", d1, AclMatchedName); + if (0 == l2) { + if ('.' == d1[l1 - 1]) { + debug(28, 0) ("WARNING: %s is a subdomain of %s\n", d2, d1); + debug(28, 0) ("WARNING: This may break Splay tree searching\n"); + debug(28, 0) ("WARNING: You should remove '%s' from the ACL named '%s'\n", d1, AclMatchedName); + } return 1; /* d1> d2 */ } }