From fcc97ec96da813460f73ff928f9ee5843375d744 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Thu, 21 Dec 2023 16:30:23 +0100 Subject: [PATCH] network parser: iterate deterministically MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/PVE/INotify.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PVE/INotify.pm b/src/PVE/INotify.pm index bc33a8f..601e651 100644 --- a/src/PVE/INotify.pm +++ b/src/PVE/INotify.pm @@ -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+$/) {