]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - html/cgi-bin/fwhosts.cgi
Merge branch 'next' of git.ipfire.org:/pub/git/ipfire-2.x into next
[ipfire-2.x.git] / html / cgi-bin / fwhosts.cgi
index 35afad3e446616f48c7856a15b03ec3ecb4f2d4d..a2ade8a202f30cafc9592e632f638df7b45b888d 100644 (file)
@@ -301,7 +301,7 @@ if ($fwhostsettings{'ACTION'} eq 'savenet' )
                }
                if($fwhostsettings{'error'} ne 'on'){
                                my $fullip="$fwhostsettings{'IP'}/".&General::iporsubtocidr($fwhostsettings{'SUBNET'});
-                               $errormessage=$errormessage.&General::checksubnets($fwhostsettings{'HOSTNAME'},$fullip,"");
+                               $errormessage=$errormessage.&General::checksubnets($fwhostsettings{'HOSTNAME'},$fullip,"","exact");
                }
                #only check plausi when no error till now
                if (!$errormessage){
@@ -624,9 +624,9 @@ if ($fwhostsettings{'ACTION'} eq 'savegrp')
                }
                #check if host/net exists in grp
                
-               my $test="$grp,$fwhostsettings{'oldremark'},@target";
+               my $test="$grp,$fwhostsettings{'oldremark'},@target,$type";
                foreach my $key (keys %customgrp) {
-                       my $test1="$customgrp{$key}[0],$customgrp{$key}[1],$customgrp{$key}[2]";
+                       my $test1="$customgrp{$key}[0],$customgrp{$key}[1],$customgrp{$key}[2],$customgrp{$key}[3]";
                        if ($test1 eq $test){
                                $errormessage=$Lang::tr{'fwhost err isingrp'};
                                $fwhostsettings{'update'} = 'on';
@@ -2555,18 +2555,6 @@ sub checkip
        }
        return 1;
 }
-sub checksubnet
-{
-       my %hash=%{(shift)};
-       &General::readhasharray("$confignet", \%hash);
-       foreach my $key (keys %hash) {
-               if(&General::IpInSubnet($fwhostsettings{'IP'},$hash{$key}[1],$hash{$key}[2]))
-               {
-                       return 1;
-               }
-       }
-       return 0;
-}
 sub checkservicegroup
 {
        &General::readhasharray("$configsrvgrp", \%customservicegrp);