From: Alexander Marx Date: Mon, 31 Oct 2016 11:19:15 +0000 (+0100) Subject: BUG11242: Fix for adding 2 VPN Hosts/network with same name X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bc4a68812bb131be6a8413f69909bf6a3d5a89a2;p=people%2Fms%2Fipfire-2.x.git BUG11242: Fix for adding 2 VPN Hosts/network with same name If one has an IPSec network named "aaa" and an OpenVPn Host with the same name it was not possible to group them together because of the same name. Now the Network type is also checked wich allows Entries with same name, but different networks. Fixes: #11242 Signed-off-by: Alexander Marx Signed-off-by: Michael Tremer --- diff --git a/html/cgi-bin/fwhosts.cgi b/html/cgi-bin/fwhosts.cgi index 35afad3e44..1b0fe07517 100644 --- a/html/cgi-bin/fwhosts.cgi +++ b/html/cgi-bin/fwhosts.cgi @@ -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';