From 72586f0ff0bad5d1e9f75ab02dfc3e7595b47ded Mon Sep 17 00:00:00 2001 From: Alexander Marx Date: Tue, 2 Jul 2013 15:43:44 +0200 Subject: [PATCH] Forward Firewall: colorize ip addresses when possible in firewall groups. subnetmask now in cidr format --- html/cgi-bin/forwardfw.cgi | 4 ++++ html/cgi-bin/fwhosts.cgi | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) 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 ''){ -- 2.39.2