mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 19:23:24 +02:00
BUG11131: fix errormessage when more ipsec subnets defined
When having more than one subnet in an ipsec connection it is not possible to create a new openvpn static subnet. Signed-off-by: Alexander Marx <alexander.marx@ipfire.org> Signed-off-by: Heino Gutschmidt <heino.gutschmidt@managedhosting.de> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
committed by
Michael Tremer
parent
ec149ba026
commit
ecc9c73bb5
@@ -516,12 +516,14 @@ sub checksubnets
|
||||
&General::readhasharray("${General::swroot}/vpn/config", \%ipsecconf);
|
||||
foreach my $key (keys %ipsecconf){
|
||||
if ($ipsecconf{$key}[11] ne ''){
|
||||
my ($ipsecip,$ipsecsub) = split (/\//, $ipsecconf{$key}[11]);
|
||||
$ipsecsub=&iporsubtodec($ipsecsub);
|
||||
if($ipsecconf{$key}[1] ne $ccdname){
|
||||
if ( &IpInSubnet ($ip,$ipsecip,$ipsecsub) ){
|
||||
$errormessage=$Lang::tr{'ccd err isipsecnet'}." Name: $ipsecconf{$key}[1]";
|
||||
return $errormessage;
|
||||
foreach my $ipsecsubitem (split(/\|/, $ipsecconf{$key}[11])) {
|
||||
my ($ipsecip,$ipsecsub) = split (/\//, $ipsecconf{$key}[11]);
|
||||
$ipsecsub=&iporsubtodec($ipsecsub);
|
||||
if($ipsecconf{$key}[1] ne $ccdname){
|
||||
if ( &IpInSubnet ($ip,$ipsecip,$ipsecsub) ){
|
||||
$errormessage=$Lang::tr{'ccd err isipsecnet'}." Name: $ipsecconf{$key}[1]";
|
||||
return $errormessage;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user