]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blobdiff - html/cgi-bin/firewall.cgi
Firewall: When using custom hosts and not having BLUE or ORANGE, the Ruletable took...
[people/teissler/ipfire-2.x.git] / html / cgi-bin / firewall.cgi
index ff950c449a56e8e0e962e260b04ee7c81ef1bda0..cf94c8f8bccccefe6692c56b5af0aa8530f9e237 100644 (file)
@@ -1334,7 +1334,7 @@ sub getcolor
                        return;
                }elsif($val =~ /^(.*?)\/(.*?)$/){
                        my ($sip,$scidr) = split ("/",$val);
-                       if ( &General::IpInSubnet($sip,$netsettings{'ORANGE_ADDRESS'},$netsettings{'ORANGE_NETMASK'})){
+                       if ( &Header::orange_used() && &General::IpInSubnet($sip,$netsettings{'ORANGE_ADDRESS'},$netsettings{'ORANGE_NETMASK'})){
                                $tdcolor="style='background-color: $Header::colourorange;color:white;'";
                                return;
                        }
@@ -1342,7 +1342,7 @@ sub getcolor
                                $tdcolor="style='background-color: $Header::colourgreen;color:white;'";
                                return;
                        }
-                       if ( &General::IpInSubnet($sip,$netsettings{'BLUE_ADDRESS'},$netsettings{'BLUE_NETMASK'})){
+                       if ( &Header::blue_used() && &General::IpInSubnet($sip,$netsettings{'BLUE_ADDRESS'},$netsettings{'BLUE_NETMASK'})){
                                $tdcolor="style='background-color: $Header::colourblue;color:white;'";
                                return;
                        }
@@ -2562,11 +2562,11 @@ END
                                                push (@nat_ifaces,&fwlib::get_nat_address($$hash{$key}[29],$val));
                                        }
                                        @nat_ifaces=&del_double(@nat_ifaces);
-                                       $natstring = join(', ', @nat_ifaces);
+                                       $natstring = "";
                                }else{
-                                       $natstring = $$hash{$key}[29];
+                                       $natstring = "($$hash{$key}[29])";
                                }
-                               print "$Lang::tr{'firewall'} ($natstring)";
+                               print "$Lang::tr{'firewall'} $natstring";
                                if($$hash{$key}[30] ne ''){
                                        $$hash{$key}[30]=~ tr/|/,/;
                                        print": $$hash{$key}[30]";