[pve-devel] applied: [PATCH firewall] Fix unitialized value $mark in bitwise operation

Wolfgang Bumiller w.bumiller at proxmox.com
Mon Feb 18 10:39:00 CET 2019


applied

On Wed, Feb 13, 2019 at 12:27:58PM +0100, Alwin Antreich wrote:
> Signed-off-by: Alwin Antreich <a.antreich at proxmox.com>
> ---
>  src/PVE/FirewallSimulator.pm | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/PVE/FirewallSimulator.pm b/src/PVE/FirewallSimulator.pm
> index b01e45b..188c38f 100644
> --- a/src/PVE/FirewallSimulator.pm
> +++ b/src/PVE/FirewallSimulator.pm
> @@ -21,7 +21,7 @@ eval {
>      $have_lxc = 1;
>  };
>  
> -my $mark;
> +my $mark = 0;
>  my $trace;
>  my $debug = 0;
>  
> @@ -227,7 +227,7 @@ sub rule_match {
>  
>  	if ($rule =~ s@^-m mark --mark ($NUMBER_RE)(?:/($NUMBER_RE))?\s*@@) {
>  	    my ($value, $mask) = PVE::Firewall::get_mark_values($1, $2);
> -	    return undef if !defined($mark) || ($mark & $mask) != $value;
> +	    return undef if ($mark & $mask) != $value;
>  	    next;
>  	}
>  
> -- 
> 2.11.0




More information about the pve-devel mailing list