Firewall: appended check of maximum ports per protocol. portranges 100:200 count...
authorAlexander Marx <amarx@ipfire.org>
Tue, 12 Nov 2013 15:04:55 +0000 (16:04 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 12 Nov 2013 23:34:08 +0000 (00:34 +0100)
html/cgi-bin/fwhosts.cgi

index 7d1f215d5b6710481728da26c713ab7694193ec4..bc9ca85d4cf9487094ca5ada912652e9755faea4 100755 (executable)
@@ -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;