-my $pt = new Net::Patricia;
-
-open(COUNTRIES, "< /etc/powerdns/countries.conf") || die "Can't open /etc/powerdns/countries.conf";
-
-while (my $line = <COUNTRIES>)
-{
- if ($line =~ /^(\d+\.\d+\.\d+\.\d+\/\d+)\s+:127\.\d+\.\d+\.\d+:([a-z]{2})/)
- {
- my $address = $1;
- my $country = uc($2);
-
- $pt->add_string($address, $country);
- }
-}
-
-close(COUNTRIES);
-
+my $gi = Geo::IP->open("/usr/share/GeoIP/GeoIP.dat", GEOIP_MEMORY_CACHE);
+my $total_bandwidth = 560 * 1024 * 1024;