[pve-devel] applied: [PATCH firewall] sort ipsets so that the digest is consistent

Wolfgang Bumiller w.bumiller at proxmox.com
Wed Nov 15 13:14:53 CET 2017


On Wed, Nov 15, 2017 at 11:41:34AM +0100, Dominik Csapak wrote:
> otherwise, editing an ipset randomly works (or not) due to
> a wrong digest
> 
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
>  src/PVE/API2/Firewall/IPSet.pm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/PVE/API2/Firewall/IPSet.pm b/src/PVE/API2/Firewall/IPSet.pm
> index ea6d1a2..068c1a4 100644
> --- a/src/PVE/API2/Firewall/IPSet.pm
> +++ b/src/PVE/API2/Firewall/IPSet.pm
> @@ -497,7 +497,7 @@ my $get_ipset_list = sub {
>      my ($fw_conf) = @_;
>  
>      my $res = [];
> -    foreach my $name (keys %{$fw_conf->{ipset}}) {
> +    foreach my $name (sort keys %{$fw_conf->{ipset}}) {
>  	my $data = { 
>  	    name => $name,
>  	};
> -- 
> 2.11.0




More information about the pve-devel mailing list