public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH manager] network-interface-pinning: ignore comments in .link parser
@ 2026-05-20  9:55 Gabriel Goller
  2026-05-20 10:22 ` Robert Obkircher
  2026-05-20 11:51 ` applied: " Thomas Lamprecht
  0 siblings, 2 replies; 3+ messages in thread
From: Gabriel Goller @ 2026-05-20  9:55 UTC (permalink / raw)
  To: pve-devel

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





^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-05-20 11:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-20  9:55 [PATCH manager] network-interface-pinning: ignore comments in .link parser Gabriel Goller
2026-05-20 10:22 ` Robert Obkircher
2026-05-20 11:51 ` applied: " Thomas Lamprecht

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