From: Gabriel Goller <g.goller@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH manager] network-interface-pinning: ignore comments in .link parser
Date: Wed, 20 May 2026 11:55:45 +0200 [thread overview]
Message-ID: <20260520095613.86640-1-g.goller@proxmox.com> (raw)
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 <r.obkircher@proxmox.com>
Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
---
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*(?:[#;]|$)/;
if ($line =~ m/^\[(Match|Link)\]$/) {
$section = $1;
--
2.47.3
next reply other threads:[~2026-05-20 9:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-20 9:55 Gabriel Goller [this message]
2026-05-20 10:22 ` [PATCH manager] network-interface-pinning: ignore comments in .link parser Robert Obkircher
2026-05-20 11:51 ` applied: " Thomas Lamprecht
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=20260520095613.86640-1-g.goller@proxmox.com \
--to=g.goller@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.