general-functions.pl: do not miscalculate when enumerating IPsec N2N subnet membership

Message ID 872d1856-053d-5c5e-e7d1-dfee8e2bff5b@ipfire.org
State Accepted
Commit db4e10a6ecdb59a6f19249873ba5d50b22db6a68
Headers
Series general-functions.pl: do not miscalculate when enumerating IPsec N2N subnet membership |

Commit Message

Peter Müller April 22, 2021, 4:15 p.m. UTC
  Fixes: #11235

Cc: Alexander Marx <alexander.marx@ipfire.org>
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
---
 config/cfgroot/general-functions.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/config/cfgroot/general-functions.pl b/config/cfgroot/general-functions.pl
index a6656ccf5..00ace0361 100644
--- a/config/cfgroot/general-functions.pl
+++ b/config/cfgroot/general-functions.pl
@@ -530,7 +530,7 @@  sub checksubnets
 		foreach my $key (keys %ipsecconf){
 			if ($ipsecconf{$key}[11] ne '' && $ipsecconf{$key}[36] eq ""){
 				foreach my $ipsecsubitem (split(/\|/, $ipsecconf{$key}[11])) {
-					my ($ipsecip,$ipsecsub) = split (/\//, $ipsecconf{$key}[11]);
+					my ($ipsecip,$ipsecsub) = split (/\//, $ipsecsubitem);
 					$ipsecsub=&iporsubtodec($ipsecsub);
 					if($ipsecconf{$key}[1] ne $ccdname){
 						if ( &IpInSubnet ($ip,$ipsecip,$ipsecsub) ){