From: Alexander Marx Date: Sat, 17 Oct 2015 16:32:10 +0000 (+0200) Subject: BUG10806: fix wrong customhostgroupcheck X-Git-Tag: v2.17-core95~45 X-Git-Url: http://git.ipfire.org/?p=ipfire-2.x.git;a=commitdiff_plain;h=8b7417c50b8d3de46003bd40d779bef222dc4171 BUG10806: fix wrong customhostgroupcheck 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 Signed-off-by: Michael Tremer --- diff --git a/html/cgi-bin/firewall.cgi b/html/cgi-bin/firewall.cgi index c207ec7487..682c2855c6 100644 --- a/html/cgi-bin/firewall.cgi +++ b/html/cgi-bin/firewall.cgi @@ -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; }