]> git.proxmox.com Git - pve-firewall.git/commitdiff
Fix #1841: ebtables: sort interfaces per guest
authorStoiko Ivanov <s.ivanov@proxmox.com>
Thu, 23 Aug 2018 14:04:50 +0000 (16:04 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Fri, 24 Aug 2018 07:58:37 +0000 (09:58 +0200)
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
src/PVE/Firewall.pm

index fefe42ad6fd046255543c067736ae269f6568a2d..ef00d0ce6d31ee82ddad66a2c822c0c094d2753c 100644 (file)
@@ -3678,7 +3678,7 @@ sub compile_ebtables_filter {
            my $vmfw_conf = $vmfw_configs->{$vmid};
            return if !$vmfw_conf;
 
-           foreach my $netid (keys %$conf) {
+           foreach my $netid (sort keys %$conf) {
                next if $netid !~ m/^net(\d+)$/;
                my $net = PVE::QemuServer::parse_net($conf->{$netid});
                next if !$net->{firewall};
@@ -3700,7 +3700,7 @@ sub compile_ebtables_filter {
            my $vmfw_conf = $vmfw_configs->{$vmid};
            return if !$vmfw_conf || !$vmfw_conf->{options}->{enable};
 
-           foreach my $netid (keys %$conf) {
+           foreach my $netid (sort keys %$conf) {
                next if $netid !~ m/^net(\d+)$/;
                my $net = PVE::LXC::Config->parse_lxc_network($conf->{$netid});
                next if !$net->{firewall};