public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Daniel Krambrock via pve-devel <pve-devel@lists.proxmox.com>
To: pve-devel@lists.proxmox.com
Cc: Daniel Krambrock <krambrock@hrz.uni-marburg.de>
Subject: [pve-devel] [PATCH v3 firewall] fix #5335: stable sorting in cluster.fw
Date: Tue, 16 Apr 2024 13:27:44 +0200	[thread overview]
Message-ID: <mailman.522.1713355468.450.pve-devel@lists.proxmox.com> (raw)

[-- Attachment #1: Type: message/rfc822, Size: 4377 bytes --]

From: Daniel Krambrock <krambrock@hrz.uni-marburg.de>
To: pve-devel@lists.proxmox.com
Cc: Daniel Krambrock <krambrock@hrz.uni-marburg.de>
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>

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 <krambrock@hrz.uni-marburg.de>
---
 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



[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

                 reply	other threads:[~2024-04-17 12:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=mailman.522.1713355468.450.pve-devel@lists.proxmox.com \
    --to=pve-devel@lists.proxmox.com \
    --cc=krambrock@hrz.uni-marburg.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal