]> git.proxmox.com Git - pve-firewall.git/commitdiff
fix #5335: stable sorting in cluster.fw
authorDaniel Krambrock via pve-devel <pve-devel@lists.proxmox.com>
Tue, 16 Apr 2024 07:26:45 +0000 (09:26 +0200)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Tue, 16 Apr 2024 12:26:42 +0000 (14:26 +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 <krambrock@hrz.uni-marburg.de>
src/PVE/Firewall.pm

index 77cbaf46598ff7eff0842a0484ef90239e4a58b0..81a879886ab4e66cff7a1305de162758a754dc44 100644 (file)
@@ -3360,7 +3360,7 @@ my $format_aliases = sub {
     my $raw = '';
 
     $raw .= "[ALIASES]\n\n";
-    foreach my $k (keys %$aliases) {
+    foreach my $k (sort keys %$aliases) {
        my $e = $aliases->{$k};
        $raw .= "$e->{name} $e->{cidr}";
        $raw .= " # " . encode('utf8', $e->{comment})