From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id D88431FF37F for ; Wed, 17 Apr 2024 14:04:35 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 56DF5466C; Wed, 17 Apr 2024 14:04:30 +0200 (CEST) To: pve-devel@lists.proxmox.com Date: Tue, 16 Apr 2024 13:27:44 +0200 X-Mailman-Approved-At: Wed, 17 Apr 2024 14:04:28 +0200 MIME-Version: 1.0 Message-ID: List-Id: Proxmox VE development discussion List-Post: From: Daniel Krambrock via pve-devel Precedence: list Cc: Daniel Krambrock X-Mailman-Version: 2.1.29 X-BeenThere: pve-devel@lists.proxmox.com List-Subscribe: , List-Unsubscribe: , List-Archive: Reply-To: Proxmox VE development discussion List-Help: Subject: [pve-devel] [PATCH v3 firewall] fix #5335: stable sorting in cluster.fw Content-Type: multipart/mixed; boundary="===============2349842574439860074==" Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" --===============2349842574439860074== Content-Type: message/rfc822 Content-Disposition: inline Return-Path: X-Original-To: pve-devel@lists.proxmox.com Delivered-To: pve-devel@lists.proxmox.com Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 8249596999 for ; Tue, 16 Apr 2024 13:28:24 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 5A85E186CB for ; Tue, 16 Apr 2024 13:27:54 +0200 (CEST) Received: from vhrz1173.hrz.uni-marburg.de (vhrz1173.hrz.uni-marburg.de [137.248.1.43]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Tue, 16 Apr 2024 13:27:53 +0200 (CEST) Received: from vhrz1173.hrz.uni-marburg.de (vhrz1173.HRZ.Uni-Marburg.DE [137.248.1.43]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by vhrz1865.HRZ.Uni-Marburg.DE (Postfix) with ESMTPS id 4VJhbs31CBzydq; Tue, 16 Apr 2024 13:27:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uni-marburg.de; s=dkim; t=1713266873; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references; bh=pFccg8T915lCyqi9Mxukj3GC86+IwdKjXhVhDE4oPTw=; b=s56X5raEPWnwRKAz1fN3qqdMKQ8CBiAeHlC4h00GSg0V5NaIujdsy+9ozfQK/6xmNoAq5B p34TOkC8Y07mt4+Yw+awxOSomh1ns7LFXP6Jt657rzENBKj+24cIThR+h85xztQr1J3P6h 5AT5SR9w/JWynde0THZLM0tGoRCriS8= Authentication-Results: smtpd-out; dkim=none; spf=pass (smtpd-out: domain of krambrock@hrz.uni-marburg.de designates 137.248.1.43 as permitted sender) smtp.mailfrom=krambrock@hrz.uni-marburg.de Received: from laptop.HRZ.Uni-Marburg.DE (mvpn1831.VPN.Uni-Marburg.DE [137.248.108.31]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by vhrz1865.HRZ.Uni-Marburg.DE (Postfix) with ESMTPSA id 4VJhbs1kgszydv; Tue, 16 Apr 2024 13:27:53 +0200 (CEST) From: Daniel Krambrock To: pve-devel@lists.proxmox.com Cc: Daniel Krambrock Subject: [PATCH v3 firewall] fix #5335: stable sorting in cluster.fw Date: Tue, 16 Apr 2024 13:27:44 +0200 Message-Id: <20240416112744.19301-1-krambrock@hrz.uni-marburg.de> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Score: 0.44 / 12.00 / 15.00 X-Rspamd-Queue-Id: 4VJhbs31CBzydq X-SPAM-LEVEL: Spam detection results: 0 BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DMARC_PASS -0.1 DMARC pass policy RCVD_IN_MSPIKE_H4 0.001 Very Good reputation (+4) RCVD_IN_MSPIKE_WL 0.001 Mailspike good senders SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record X-Mailman-Approved-At: Wed, 17 Apr 2024 14:04:28 +0200 Stable sorting in cluster.fw config file allows tracking changes by checking into git or when using automation like ansible. Signed-off-by: Daniel Krambrock --- changes since v2: * code-style fix src/PVE/Firewall.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PVE/Firewall.pm b/src/PVE/Firewall.pm index 77cbaf4..8979413 100644 --- a/src/PVE/Firewall.pm +++ b/src/PVE/Firewall.pm @@ -3360,7 +3360,7 @@ my $format_aliases = sub { my $raw = ''; $raw .= "[ALIASES]\n\n"; - foreach my $k (keys %$aliases) { + for my $k (sort keys %$aliases) { my $e = $aliases->{$k}; $raw .= "$e->{name} $e->{cidr}"; $raw .= " # " . encode('utf8', $e->{comment}) -- 2.39.2 --===============2349842574439860074== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel --===============2349842574439860074==--