* [PATCH pve-common 1/1] network: interfaces: add guard for substitution in slaves property
@ 2026-11-04 16:04 Stefan Hanreich
2026-11-05 12:33 ` applied: " Fiona Ebner
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Hanreich @ 2026-11-04 16:04 UTC (permalink / raw)
To: pve-devel
Otherwise bonds with no slaves defined will trigger a perl warning
that substition is performed on an undefined variable.
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
src/PVE/Network/Interfaces.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PVE/Network/Interfaces.pm b/src/PVE/Network/Interfaces.pm
index ad4d837..19d5b08 100644
--- a/src/PVE/Network/Interfaces.pm
+++ b/src/PVE/Network/Interfaces.pm
@@ -647,7 +647,7 @@ sub __interface_to_string($iface, $d, $family, $first_block, $ifupdown2 = undef)
} elsif ($d->{type} eq 'bond') {
- $d->{slaves} =~ s/[;,\s]+/ /g;
+ $d->{slaves} =~ s/[;,\s]+/ /g if $d->{slaves};
my $slaves = $d->{slaves} || 'none';
$raw .= "\tbond-slaves $slaves\n";
$done->{slaves} = 1;
--
2.47.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-05 12:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-04 16:04 [PATCH pve-common 1/1] network: interfaces: add guard for substitution in slaves property Stefan Hanreich
2026-11-05 12:33 ` applied: " Fiona Ebner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox