]> git.proxmox.com Git - pve-firewall.git/commitdiff
api: fix scoping for ipset endpoint
authorLeo Nunner <l.nunner@proxmox.com>
Tue, 13 Jun 2023 12:06:32 +0000 (14:06 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 15 Jun 2023 07:21:47 +0000 (09:21 +0200)
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 <l.nunner@proxmox.com>
src/PVE/API2/Firewall/IPSet.pm

index ed92d877ee0685726f69fc5f807c3a316a925dbe..baa57cabc2ebf96bd51a267b6d1a300291904c0b 100644 (file)
@@ -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 {