public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Wolfgang Bumiller <w.bumiller@proxmox.com>
To: Leo Nunner <l.nunner@proxmox.com>
Cc: pve-devel@lists.proxmox.com
Subject: Re: [pve-devel] [PATCH v2 firewall 1/2] api: fix scoping for ipset endpoint
Date: Thu, 15 Jun 2023 09:42:03 +0200	[thread overview]
Message-ID: <gzkrvwzimawqd5lw2ozacnugse5nouqsd6cjynniq4xpyudmrg@m4y7zetuloii> (raw)
In-Reply-To: <20230613120634.155490-2-l.nunner@proxmox.com>

picked this into stable-7 as well

On Tue, Jun 13, 2023 at 02:06:32PM +0200, Leo Nunner wrote:
> 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 | 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.30.2




  reply	other threads:[~2023-06-15  7:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-13 12:06 [pve-devel] [PATCH v2 firewall manager] firewall: introduce scoping for ipsets/aliases Leo Nunner
2023-06-13 12:06 ` [pve-devel] [PATCH v2 firewall 1/2] api: fix scoping for ipset endpoint Leo Nunner
2023-06-15  7:42   ` Wolfgang Bumiller [this message]
2023-06-13 12:06 ` [pve-devel] [PATCH v2 firewall 2/2] fix #4556: api: return scoped IPSets and aliases Leo Nunner
2023-06-13 12:06 ` [pve-devel] [PATCH v2 manager] firewall: add scope field to IPRefSelector Leo Nunner
2023-06-15  7:41 ` [pve-devel] applied-series: [PATCH v2 firewall manager] firewall: introduce scoping for ipsets/aliases Wolfgang Bumiller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=gzkrvwzimawqd5lw2ozacnugse5nouqsd6cjynniq4xpyudmrg@m4y7zetuloii \
    --to=w.bumiller@proxmox.com \
    --cc=l.nunner@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal