From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 178D41FF0B3 for ; Wed, 14 Oct 2026 17:30:25 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 96C48214C9; Wed, 14 Oct 2026 17:30:22 +0200 (CEST) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: Re: [PATCH pve-firewall v2] api: aliases: make 'cidr' optional when updating From: Stefan Hanreich To: Arthur Bied-Charreton In-Reply-To: <20260929132534.479718-1-a.bied-charreton@proxmox.com> References: <20260929132534.479718-1-a.bied-charreton@proxmox.com> Date: Wed, 14 Oct 2026 17:30:08 +0200 Message-Id: <179199180896.318505.14249674297284436098.b4-review@b4> X-Mailer: b4 0.16-dev-fbf84 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1791991817933 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.571 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: OBY4CQIP3Y6DJVDCB63LDUSAURPYYCNE X-Message-ID-Hash: OBY4CQIP3Y6DJVDCB63LDUSAURPYYCNE X-MailFrom: s.hanreich@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: pve-devel@lists.proxmox.com X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: > @@ -251,7 +251,10 @@ sub register_update_alias { > > raise_param_exc({ name => "no such alias" }) if !$aliases->{$name}; > > - my $data = { name => $param->{name}, cidr => $param->{cidr} }; > + my $data = { > + name => $param->{name}, > + cidr => $param->{cidr} // $aliases->{$name}->{cidr}, > + }; > $data->{comment} = $param->{comment} if $param->{comment}; The comment here gets overwritten when updating the cidr, also when renaming. -- Stefan Hanreich