X-Git-Url: http://git.ipfire.org/?p=people%2Fteissler%2Fipfire-2.x.git;a=blobdiff_plain;f=html%2Fcgi-bin%2Fforwardfw.cgi;h=c18f4f41c3b410a510624312acf41ec07732b709;hp=0907fba9bd5591da5d3b34bb2d6055ea82f1d24d;hb=b119578f023df75a015505239751246c23f9a523;hpb=5bee9a9df5739810da488bf5bf71da4fe82be484 diff --git a/html/cgi-bin/forwardfw.cgi b/html/cgi-bin/forwardfw.cgi index 0907fba9b..c18f4f41c 100755 --- a/html/cgi-bin/forwardfw.cgi +++ b/html/cgi-bin/forwardfw.cgi @@ -1243,6 +1243,14 @@ sub getcolor my $val=shift; my $hash=shift; if($optionsfw{'SHOWCOLORS'} eq 'on'){ + #custom Hosts + if ($nettype eq 'cust_host_src' || $nettype eq 'cust_host_tgt'){ + foreach my $key (sort keys %$hash){ + if ($$hash{$key}[0] eq $val){ + $val=$$hash{$key}[2]; + } + } + } #standard networks if ($val eq 'GREEN'){ $tdcolor="style='background-color: $Header::colourgreen;color:white;'"; @@ -1277,8 +1285,8 @@ sub getcolor $tdcolor="style='background-color: $Header::colourred;color:white;'"; return; } - #Check if a manual IP is part of a VPN - if ($nettype eq 'src_addr' || $nettype eq 'tgt_addr'){ + #Check if a manual IP or custom host is part of a VPN + if ($nettype eq 'src_addr' || $nettype eq 'tgt_addr' || $nettype eq 'cust_host_src' || $nettype eq 'cust_host_tgt'){ #Check if IP is part of OpenVPN dynamic subnet my ($a,$b) = split("/",$ovpnsettings{'DOVPN_SUBNET'}); my ($c,$d) = split("/",$val); @@ -1332,14 +1340,6 @@ sub getcolor $tdcolor="style='background-color: $Header::colourvpn;color:white;'"; return; } - #custom Hosts - if ($nettype eq 'cust_host_src' || $nettype eq 'cust_host_tgt'){ - foreach my $key (sort keys %$hash){ - if ($$hash{$key}[0] eq $val){ - $val=$$hash{$key}[2]; - } - } - } #ALIASE foreach my $alias (sort keys %aliases) {