diff -Nur e-smith-proxy-5.4.0/root/etc/e-smith/templates/etc/squid/squid.conf/20ACL10localhost e-smith-proxy-5.4.0-cidr/root/etc/e-smith/templates/etc/squid/squid.conf/20ACL10localhost --- e-smith-proxy-5.4.0/root/etc/e-smith/templates/etc/squid/squid.conf/20ACL10localhost 2005-07-19 01:06:32.000000000 +0200 +++ e-smith-proxy-5.4.0-cidr/root/etc/e-smith/templates/etc/squid/squid.conf/20ACL10localhost 2013-02-18 22:36:12.513504277 +0100 @@ -1,9 +1,21 @@ { use esmith::NetworksDB; + use Net::IPv4Addr; my $ndb = esmith::NetworksDB->open_ro(); - $localAccess = $ndb->local_access_spec(); + my $localAccess = ''; + foreach ($ndb->local_access_spec()){ + # If there's a / in the network string + # then convert to CIDR notation + if (m!/!) { + my ($ip,$bits) = Net::IPv4Addr::ipv4_parse($_); + $localAccess .= "$ip/$bits "; + } + else { + $localAccess .= "$_ "; + } + } $OUT .= "acl localsrc src $localAccess\n"; $OUT .= "acl localdst dst $localAccess";