]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
BUG11242: Fix for adding 2 VPN Hosts/network with same name
authorAlexander Marx <alexander.marx@ipfire.org>
Mon, 31 Oct 2016 11:19:15 +0000 (12:19 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 17 Nov 2016 14:11:50 +0000 (14:11 +0000)
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 <alexander.marx@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
html/cgi-bin/fwhosts.cgi

index 35afad3e446616f48c7856a15b03ec3ecb4f2d4d..1b0fe075178a765e8b107ad7c60e8615cc1e3fb3 100644 (file)
@@ -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';