From: wessels <> Date: Wed, 10 Apr 1996 09:51:26 +0000 (+0000) Subject: From: "Daniel O'Callaghan" X-Git-Tag: SQUID_3_0_PRE1~6243 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b2bc6f9e5e4f2b14dd78e0b34653d80becf01ea6;p=thirdparty%2Fsquid.git From: "Daniel O'Callaghan" Added world and Class A, and put in htonl where needed. --- diff --git a/src/cache_cf.cc b/src/cache_cf.cc index b6a5a418b5..cc69f4bd06 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -1,4 +1,4 @@ -/* $Id: cache_cf.cc,v 1.27 1996/04/09 18:20:26 wessels Exp $ */ +/* $Id: cache_cf.cc,v 1.28 1996/04/10 03:51:26 wessels Exp $ */ /* DEBUG: Section 3 cache_cf: Configuration file parsing */ @@ -278,10 +278,14 @@ void addToIPACL(list, ip_str, access) switch (c) { case 4: - if (a3 == 0 && a4 == 0) - lmask.s_addr = 0xffff0000; - else if (a4 == 0) - lmask.s_addr = 0xffffff00; + if (a1 == 0 && a2 == 0 && a3 == 0 && a4 == 0) /* world */ + lmask.s_addr = 0x00000000; + else if (a2 == 0 && a3 == 0 && a4 == 0) /* class A */ + lmask.s_addr = htonl(0xff000000); + else if (a3 == 0 && a4 == 0) /* class B */ + lmask.s_addr = htonl(0xffff0000); + else if (a4 == 0) /* class C */ + lmask.s_addr = htonl(0xffffff00); else lmask.s_addr = 0xffffffff; break;