]> git.proxmox.com Git - pve-common.git/commitdiff
network parser: iterate deterministically
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Thu, 21 Dec 2023 15:30:23 +0000 (16:30 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 3 Jan 2024 11:15:37 +0000 (12:15 +0100)
makes the behaviour easier to analyze, and also helps when testing since it
allows constructing test cases that trigger certain order of parsing.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
src/PVE/INotify.pm

index bc33a8fe6443c8f17fef1e59611045a0f36663e1..601e651d3e540f74c136fdd11e9ec70a96987f5b 100644 (file)
@@ -1030,7 +1030,7 @@ sub __read_etc_network_interfaces {
        };
     }
 
-    foreach my $iface (keys %$ifaces) {
+    foreach my $iface (sort keys %$ifaces) {
        my $d = $ifaces->{$iface};
        $d->{type} = 'unknown';
        if ($iface =~ m/^bond\d+$/) {