]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/commitdiff
Firewall: Fix slow generation of host table in firewall groups
authorAlexander Marx <alexander.marx@ipfire.org>
Wed, 7 May 2014 10:09:28 +0000 (12:09 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 7 May 2014 10:13:13 +0000 (12:13 +0200)
html/cgi-bin/fwhosts.cgi

index c5e1c28452ca814f5a99286f6e781cbe4b4a0142..eeb83ac127bc216b3e7c10e7568c1c82cab7bdb4 100644 (file)
@@ -1632,7 +1632,7 @@ sub getcolor
                }
 
                #Now check if IP is part of ORANGE,BLUE or GREEN
                }
 
                #Now check if IP is part of ORANGE,BLUE or GREEN
-               if ( &General::IpInSubnet($sip,$netsettings{'ORANGE_ADDRESS'},$netsettings{'ORANGE_NETMASK'})){
+               if ( &Header::orange_used() && &General::IpInSubnet($sip,$netsettings{'ORANGE_ADDRESS'},$netsettings{'ORANGE_NETMASK'})){
                        $tdcolor="<font style='color: $Header::colourorange;'>$c</font>";
                        return $tdcolor;
                }
                        $tdcolor="<font style='color: $Header::colourorange;'>$c</font>";
                        return $tdcolor;
                }
@@ -1640,7 +1640,7 @@ sub getcolor
                        $tdcolor="<font style='color: $Header::colourgreen;'>$c</font>";
                        return $tdcolor;
                }
                        $tdcolor="<font style='color: $Header::colourgreen;'>$c</font>";
                        return $tdcolor;
                }
-               if ( &General::IpInSubnet($sip,$netsettings{'BLUE_ADDRESS'},$netsettings{'BLUE_NETMASK'})){
+               if ( &Header::blue_used() && &General::IpInSubnet($sip,$netsettings{'BLUE_ADDRESS'},$netsettings{'BLUE_NETMASK'})){
                        $tdcolor="<font style='color: $Header::colourblue;'>$c</font>";
                        return $tdcolor;
                }
                        $tdcolor="<font style='color: $Header::colourblue;'>$c</font>";
                        return $tdcolor;
                }