From patchwork Mon May 18 19:15:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Schantl X-Patchwork-Id: 3109 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) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 49QpdX4SPWz43mK for ; Mon, 18 May 2020 19:16:00 +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 "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 49QpdV6DWYz1Fg; Mon, 18 May 2020 19:15:58 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 49QpdV3dQYz2yRQ; Mon, 18 May 2020 19:15:58 +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) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 49QpdT30xMz2xkV for ; Mon, 18 May 2020 19:15:57 +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) server-digest SHA384) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 49QpdS1vCjz1DG; Mon, 18 May 2020 19:15:56 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1589829356; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=lxA4IwkyySu+VD5CQIdjXo1V2ytIDAXqKqI6ckuOkKM=; b=IGevDHtJm8y9hyt/YktP+d4Hd5X/7u24NeHjyWur/wRTMdiE6JNMUKiq2kFg1pX7txmbXj V6B328+Fi97/zuDg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1589829356; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=lxA4IwkyySu+VD5CQIdjXo1V2ytIDAXqKqI6ckuOkKM=; b=Pf1vHrZ3d0v0lNDe/pAzINdPEcEJMo7PK9Dc1+QgNwpzO1Nu4BnQ68t6X1gR0OEPip2C59 SyrzG35ZPJ1gYUcc90Re49MEGALw3sdVFYfjw1n2Egb3qZcMUEsdcOmlw+b47VexEY+EfA W+v7MziIvIhCFOWlt/fQQ8mylrVM4Ynltj5h5LLqmbfamLOZH2m/32HJCb2nhCasFUO7B/ AT/SYeviSdDRJM0Yah05Bp1LkG3EvP8NDpRkJn5wq24QcY8BUS0+4qtdXMebMYqYTulxeS YaRTIUczlB+6EGjyPUrbfLWHSwgL0ber1p4gvoC2cHsuzez1tBg5vp6MUNh7/g== From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCH] ids-functions.pl: Fix generating of HOME_NET declaration Date: Mon, 18 May 2020 21:15:54 +0200 Message-Id: <20200518191554.3083-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 Authentication-Results: mail01.ipfire.org; auth=pass smtp.mailfrom=stefan.schantl@ipfire.org 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 #12407. Signed-off-by: Stefan Schantl --- config/cfgroot/ids-functions.pl | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/config/cfgroot/ids-functions.pl b/config/cfgroot/ids-functions.pl index f124b12be..e33569849 100644 --- a/config/cfgroot/ids-functions.pl +++ b/config/cfgroot/ids-functions.pl @@ -677,22 +677,7 @@ sub generate_home_net_file() { } # Format home net declaration. - my $line = "\"\["; - - # Loop through the array of networks. - foreach my $network (@networks) { - # Add the network to the line. - $line = "$line" . "$network"; - - # Check if the current network was the last in the array. - if ($network eq $networks[-1]) { - # Close the line. - $line = "$line" . "\]\""; - } else { - # Add "," for the next network. - $line = "$line" . "\,"; - } - } + my $line = "[" . join(',', @networks) . "]"; # Open file to store the addresses of the home net. open(FILE, ">$homenet_file") or die "Could not open $homenet_file. $!\n";