all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [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

* applied: [PATCH pve-common 1/1] network: interfaces: add guard for substitution in slaves property
  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 ` Fiona Ebner
  0 siblings, 0 replies; 2+ messages in thread
From: Fiona Ebner @ 2026-11-05 12:33 UTC (permalink / raw)
  To: pve-devel, Stefan Hanreich

On Wed, 04 Nov 2026 17:04:54 +0100, Stefan Hanreich wrote:
> Otherwise bonds with no slaves defined will trigger a perl warning
> that substition is performed on an undefined variable.
> 
> 

Applied, thanks!

[1/1] network: interfaces: add guard for substitution in slaves property
      commit: 9cbd43be04e3e1c036ca0e10a820c317c5f6e5d3




^ permalink raw reply	[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 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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal