From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 160081FF13B for ; Wed, 20 May 2026 12:22:51 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id C91458BD; Wed, 20 May 2026 12:22:48 +0200 (CEST) Message-ID: Date: Wed, 20 May 2026 12:22:43 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH manager] network-interface-pinning: ignore comments in .link parser To: Gabriel Goller , pve-devel@lists.proxmox.com References: <20260520095613.86640-1-g.goller@proxmox.com> Content-Language: en-US, de-AT From: Robert Obkircher In-Reply-To: <20260520095613.86640-1-g.goller@proxmox.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1779272548174 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.056 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment 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: JHXYGOUHT23CYMSU3MWGVEQ2Z4WDQ6TJ X-Message-ID-Hash: JHXYGOUHT23CYMSU3MWGVEQ2Z4WDQ6TJ X-MailFrom: r.obkircher@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 X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On 20.05.26 11:56, Gabriel Goller wrote: > The parser for the systemd .link files didn't support comments. This > means executing `pve-network-interface-pinning generate` after pinning > interfaces with the installer was broken because we add a comment there. > > Skip lines starting with '#' or ';' while parsing (according to `man > systemd.syntax`). > > Reported-by: Robert Obkircher > Signed-off-by: Gabriel Goller > --- > > Note that this bug is old, it was already there in the previous > release. > > PVE/CLI/pve_network_interface_pinning.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/PVE/CLI/pve_network_interface_pinning.pm b/PVE/CLI/pve_network_interface_pinning.pm > index 8e419603be60..9dff181dcd9d 100644 > --- a/PVE/CLI/pve_network_interface_pinning.pm > +++ b/PVE/CLI/pve_network_interface_pinning.pm > @@ -158,7 +158,7 @@ my sub parse_link_file { > my $data = {}; > > for my $line (@lines) { > - next if $line =~ m/^\s*$/; > + next if $line =~ m/^\s*(?:[#;]|$)/; I manually applied this to /usr/share/perl5/PVE/CLI/pve_network_interface_pinning.pm and it fixed the problem. Tested-by: Robert Obkircher > > if ($line =~ m/^\[(Match|Link)\]$/) { > $section = $1;