diff --git a/config/cfgroot/location-functions.pl b/config/cfgroot/location-functions.pl
index b0b8cd086..2cfe7f908 100644
--- a/config/cfgroot/location-functions.pl
+++ b/config/cfgroot/location-functions.pl
@@ -190,10 +190,13 @@ sub get_locations() {
return @sorted_locations;
}
-# Function to check if a given address has a special flag.
-sub address_has_flag($) {
+# Function to check if a given address has one ore more special flags.
+sub address_has_flags($) {
my ($address) = @_;
+ # Array to store the flags of the address.
+ my @flags;
+
# Init libloc database handle.
my $db_handle = &init();
@@ -206,10 +209,16 @@ sub address_has_flag($) {
# Grab the mapped location code for this flag.
$mapped_code = $network_flags{$flag};
- # Return the code.
- return $mapped_code;
+ # Add the mapped code to the array of flags.
+ push(@flags, $mapped_code);
}
}
+
+ # Sort the array of flags.
+ @flags = sort(@flags);
+
+ # Return the array of flags.
+ return @flags;
}
1;
diff --git a/html/cgi-bin/ipinfo.cgi b/html/cgi-bin/ipinfo.cgi
index cce6097ff..d8cb6c6b7 100644
--- a/html/cgi-bin/ipinfo.cgi
+++ b/html/cgi-bin/ipinfo.cgi
@@ -64,7 +64,7 @@ if (&General::validip($addr)) {
# enumerate location information for IP address...
my $db_handle = &Location::Functions::init();
my $ccode = &Location::Functions::lookup_country_code($db_handle, $addr);
- my $network_flag = &Location::Functions::address_has_flag($addr);
+ my @network_flags = &Location::Functions::address_has_flags($addr);
# Try to get the continent of the country code.
my $continent = &Location::get_continent_code($db_handle, $ccode);
@@ -111,12 +111,48 @@ if (&General::validip($addr)) {
&Header::openbox('100%', 'left', $addr . " (" . $hostname . ') : '.$whois_server);
# Check if the address has a flag.
- if ($network_flag) {
- # Get
- my $network_flag_name = &Location::Functions::get_full_country_name($network_flag);
+ if (@network_flags) {
+ # Get amount of flags for this network.
+ my $flags_amount = @network_flags;
+ my $processed_flags;
- # Display notice.
- print "