]> git.ipfire.org Git - people/amarx/ipfire-2.x.git/commitdiff
BUG10806: fix wrong customhostgroupcheck BUG10806
authorAlexander Marx <alexander.marx@ipfire.org>
Fri, 16 Oct 2015 06:59:48 +0000 (08:59 +0200)
committerAlexander Marx <alexander.marx@ipfire.org>
Sat, 17 Oct 2015 14:36:24 +0000 (16:36 +0200)
The function to check for valid hostgroup entries not only
checked the target hostgroup but also the source hostgroup if any.
This lead to the error.
Now the check only affects target hostgroups because it does not matter if a sourcegroup contains mac addresses.

Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
html/cgi-bin/firewall.cgi

index c207ec74873aff8c68185fe199eb9ca30afcdb7d..682c2855c6101694952eb495b0abb487a8b9928a 100644 (file)
@@ -597,7 +597,7 @@ sub checktarget
                &General::readhasharray("$confighost", \%customhost);
                foreach my $grpkey (sort keys %customgrp){
                        foreach my $hostkey (sort keys %customhost){
-                               if ($customgrp{$grpkey}[2] eq $customhost{$hostkey}[0] && $customhost{$hostkey}[1] eq 'mac'){
+                               if ($customgrp{$grpkey}[2] eq $customhost{$hostkey}[0] && $customgrp{$grpkey}[2] eq $fwdfwsettings{$fwdfwsettings{'grp2'}} && $customhost{$hostkey}[1] eq 'mac'){
                                        $hint=$Lang::tr{'fwdfw hint mac'};
                                        return $hint;
                                }