From aaa87fbb8311e10a702e479e81f2a4e113789039 Mon Sep 17 00:00:00 2001 From: Leo Nunner Date: Tue, 13 Jun 2023 14:06:32 +0200 Subject: [PATCH] api: fix scoping for ipset endpoint in the cluster class, we save the cluster config into the 'fw_conf' variable, and not into 'cluster_conf', which in turns is set to 'undef' instead. Signed-off-by: Leo Nunner --- src/PVE/API2/Firewall/IPSet.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/PVE/API2/Firewall/IPSet.pm b/src/PVE/API2/Firewall/IPSet.pm index ed92d87..baa57ca 100644 --- a/src/PVE/API2/Firewall/IPSet.pm +++ b/src/PVE/API2/Firewall/IPSet.pm @@ -203,6 +203,8 @@ sub register_create_ip { if ($cidr =~ m@^(dc/|guest/)?(${PVE::Firewall::ip_alias_pattern})$@) { my $scope = $1 // ""; my $alias = $2; + # on the cluster level + $cluster_conf = $fw_conf if (!$cluster_conf); # make sure alias exists (if $cidr is an alias) PVE::Firewall::resolve_alias($cluster_conf, $fw_conf, $alias, $scope); } else { -- 2.39.5