[pve-devel] applied: [PATCH firewall] Fix #1841: ebtables: sort interfaces per guest

Wolfgang Bumiller w.bumiller at proxmox.com
Fri Aug 24 10:00:11 CEST 2018


applied

On Thu, Aug 23, 2018 at 04:04:50PM +0200, Stoiko Ivanov wrote:
> Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
> ---
> The last fix for the problem forgot to test the case of a guest (VM/CT) having
> more than one interface.
> 
> src/PVE/Firewall.pm | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/PVE/Firewall.pm b/src/PVE/Firewall.pm
> index fefe42a..ef00d0c 100644
> --- a/src/PVE/Firewall.pm
> +++ b/src/PVE/Firewall.pm
> @@ -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};
> -- 
> 2.11.0




More information about the pve-devel mailing list