From patchwork Thu Apr 22 16:15:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Peter_M=C3=BCller?= X-Patchwork-Id: 4199 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4FR2Zm1q35z44R4 for ; Thu, 22 Apr 2021 16:15:28 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4FR2Zl0Dw8zHt; Thu, 22 Apr 2021 16:15:27 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4FR2Zk6ycBz2yDs; Thu, 22 Apr 2021 16:15:26 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4FR2Zj4kjXz2xSc for ; Thu, 22 Apr 2021 16:15:25 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4FR2Zh3gbBzmW for ; Thu, 22 Apr 2021 16:15:24 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1619108125; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8fxScypE4kNYscHVx5S+Yq9FdUQ3GR++v/sm2Ogtd5M=; b=8M0NdqLywtxmDJyd+ymkr8YCZgPB7qpISoz756z4sAjn68fI27hsCXSxS770NaW/Xmvxmx cR3WZNQQtCAR1BAA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1619108125; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8fxScypE4kNYscHVx5S+Yq9FdUQ3GR++v/sm2Ogtd5M=; b=lQAY+CWaaU6rlZh5jzKaHFXI3xa/ybLNs0Surm7/p7OJ9RCDDc9RyLh2LNpRRcbAaIiK7l ud8hIYAvSzKpzHoYnkGS67Cscywn7+WL7oCbjxzIwUsP1LYOq/mK+SePF4qofdsBLv56q4 wcLkBjOuMfNWLXReBmDvSz3maXPsPD1FM2eN26lQKr9VYGWJ5cLfaaRa7fvhM1uZtiyr7l cbFUqDgSaR8qwQTQ6F18244RsDyxiujmf35vQCDJHw901XkvUXA4FTM04qkViCnc2h+9oD i/70c0URNsaaI1nN5JwJITkvk1VTOyIvcqD2hbqzAw5xyUJD1kukUSsrzM0mqw== To: "IPFire: Development" From: =?utf-8?q?Peter_M=C3=BCller?= Subject: [PATCH] general-functions.pl: do not miscalculate when enumerating IPsec N2N subnet membership Message-ID: <872d1856-053d-5c5e-e7d1-dfee8e2bff5b@ipfire.org> Date: Thu, 22 Apr 2021 18:15:22 +0200 MIME-Version: 1.0 Content-Language: en-US X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Fixes: #11235 Cc: Alexander Marx Signed-off-by: Peter Müller --- config/cfgroot/general-functions.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) ){