From: hno <> Date: Sat, 12 Aug 2000 01:33:09 +0000 (+0000) Subject: Fixed the "hostname misread as an IP" case for 1234-5.example.com as well. X-Git-Tag: SQUID_3_0_PRE1~1874 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=588b63e8dd6008e49312b0b5e5250fe114ed02d9;p=thirdparty%2Fsquid.git Fixed the "hostname misread as an IP" case for 1234-5.example.com as well. --- diff --git a/src/acl.cc b/src/acl.cc index e818d56c16..df95805afc 100644 --- a/src/acl.cc +++ b/src/acl.cc @@ -1,6 +1,6 @@ /* - * $Id: acl.cc,v 1.220 2000/08/10 21:44:44 wessels Exp $ + * $Id: acl.cc,v 1.221 2000/08/11 19:33:09 hno Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Duane Wessels @@ -401,7 +401,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_ACL2 "%[0123456789.]-%[0123456789.]%c" #define SCAN_ACL3 "%[0123456789.]/%[0123456789.]" #define SCAN_ACL4 "%[0123456789.]%c" @@ -426,7 +426,7 @@ aclParseIpData(const char *t) } if (sscanf(t, SCAN_ACL1, addr1, addr2, mask) == 3) { (void) 0; - } else if (sscanf(t, SCAN_ACL2, addr1, addr2) == 2) { + } else if (sscanf(t, SCAN_ACL2, addr1, addr2, &c) == 2) { mask[0] = '\0'; } else if (sscanf(t, SCAN_ACL3, addr1, mask) == 2) { addr2[0] = '\0';