From: Alexander Marx Date: Tue, 2 Jul 2013 13:43:44 +0000 (+0200) Subject: Forward Firewall: colorize ip addresses when possible in firewall groups. subnetmask... X-Git-Url: http://git.ipfire.org/?p=people%2Fteissler%2Fipfire-2.x.git;a=commitdiff_plain;h=72586f0ff0bad5d1e9f75ab02dfc3e7595b47ded;hp=f1934a05ad64ae5dd78568eece018cdb452b2326 Forward Firewall: colorize ip addresses when possible in firewall groups. subnetmask now in cidr format --- diff --git a/html/cgi-bin/forwardfw.cgi b/html/cgi-bin/forwardfw.cgi index 07109f2c5..58eed95b4 100755 --- a/html/cgi-bin/forwardfw.cgi +++ b/html/cgi-bin/forwardfw.cgi @@ -817,6 +817,10 @@ sub checkrule } } } + if( $fwdfwsettings{'USE_SRC_PORT'} ne 'ON' && $fwdfwsettings{'USESRV'} ne 'ON'){ + $fwdfwsettings{'PROT'}=''; + $fwdfwsettings{'TGT_PROT'}=''; + } } sub checkcounter { diff --git a/html/cgi-bin/fwhosts.cgi b/html/cgi-bin/fwhosts.cgi index 753ffbece..c854e9f5c 100755 --- a/html/cgi-bin/fwhosts.cgi +++ b/html/cgi-bin/fwhosts.cgi @@ -1362,7 +1362,7 @@ sub viewtablenet }else{ print< - $Lang::tr{'name'}$Lang::tr{'fwhost netaddress'}$Lang::tr{'netmask'}$Lang::tr{'remark'}$Lang::tr{'used'} + $Lang::tr{'name'}$Lang::tr{'fwhost netaddress'}$Lang::tr{'remark'}$Lang::tr{'used'} END } my $count=0; @@ -1376,7 +1376,8 @@ END { print" "; } - print"
$customnetwork{$key}[0]".&Header::colorize($customnetwork{$key}[1])."$customnetwork{$key}[2]$customnetwork{$key}[3]$customnetwork{$key}[4]x"; + my $colnet="$customnetwork{$key}[1]/".&General::subtocidr($customnetwork{$key}[2]); + print"$customnetwork{$key}[0]".&Header::colorize($colnet)."$customnetwork{$key}[3]$customnetwork{$key}[4]x"; print< @@ -1511,6 +1512,8 @@ sub viewtablegrp if ($ip eq '' && $customgrp{$key}[2] ne $Lang::tr{'fwhost empty'}){ print "$Lang::tr{'fwhost deleted'}$customgrp{$key}[3]"; }else{ + my ($colip,$colsub) = split("/",$ip); + $ip="$colip/".&General::subtocidr($colsub) if ($colsub); print"".&Header::colorize($ip)."$customgrp{$key}[3]"; } if ($delflag > '1' && $ip ne ''){