From 7db6ad6acb8ba4339cb26970bf261942e90b65c0 Mon Sep 17 00:00:00 2001 From: Alexander Marx Date: Tue, 12 Nov 2013 16:04:55 +0100 Subject: [PATCH] Firewall: appended check of maximum ports per protocol. portranges 100:200 count as 2 ports --- html/cgi-bin/fwhosts.cgi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/html/cgi-bin/fwhosts.cgi b/html/cgi-bin/fwhosts.cgi index 7d1f215d5b..bc9ca85d4c 100755 --- a/html/cgi-bin/fwhosts.cgi +++ b/html/cgi-bin/fwhosts.cgi @@ -775,14 +775,16 @@ if ($fwhostsettings{'ACTION'} eq 'saveservicegrp') if($customservicegrp{$key}[0] eq $fwhostsettings{'SRVGRP_NAME'}){ foreach my $key1 (keys %customservice){ $tcpcounter++ if $customservice{$key1}[2] eq 'TCP' && $customservicegrp{$key}[2] eq $customservice{$key1}[0]; + $tcpcounter++ if $customservice{$key1}[2] eq 'TCP' && $customservicegrp{$key}[2] eq $customservice{$key1}[0] && $customservice{$key1}[1] =~m/:/i; $udpcounter++ if $customservice{$key1}[2] eq 'UDP' && $customservicegrp{$key}[2] eq $customservice{$key1}[0]; + $udpcounter++ if $customservice{$key1}[2] eq 'UDP' && $customservicegrp{$key}[2] eq $customservice{$key1}[0] && $customservice{$key1}[1] =~m/:/i; } } } - if ($tcpcounter > 13){ + if ($tcpcounter > 15){ $errormessage=$Lang::tr{'fwhost err maxservicetcp'}; } - if ($udpcounter > 13){ + if ($udpcounter > 15){ $errormessage=$Lang::tr{'fwhost err maxserviceudp'}; } $tcpcounter=0; -- 2.39.2