* [pve-devel] [PATCH v3 firewall] fix #5335: stable sorting in cluster.fw
@ 2024-04-16 11:27 Daniel Krambrock via pve-devel
0 siblings, 0 replies; only message in thread
From: Daniel Krambrock via pve-devel @ 2024-04-16 11:27 UTC (permalink / raw)
To: pve-devel; +Cc: Daniel Krambrock
[-- 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-04-17 12:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-16 11:27 [pve-devel] [PATCH v3 firewall] fix #5335: stable sorting in cluster.fw Daniel Krambrock via pve-devel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox