From cceda25a60a76270183f2fef72ff861d38a24c85 Mon Sep 17 00:00:00 2001 From: Ilia Ross Date: Mon, 10 Aug 2026 23:09:09 +0200 Subject: [PATCH] Fix to restrict live deletion to virtual network devices https://github.com/webmin/webmin/pull/2795 --- net/linux-lib.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/linux-lib.pl b/net/linux-lib.pl index 4c4be648d..5f879f310 100755 --- a/net/linux-lib.pl +++ b/net/linux-lib.pl @@ -617,10 +617,10 @@ else { sub destroy_interface_device { my ($a) = @_; +my $name = $a->{'fullname'} || $a->{'name'}; if (&has_command("ip") && $a->{'virtual'} eq '' && - (&use_ifup_command($a) || $a->{'bridge'})) { - &backquote_logged("ip link delete ". - quotemeta($a->{'fullname'} || $a->{'name'})." 2>&1"); + &iface_type($name) =~ /(?:Bonded|VLAN|Bridge)$/) { + &backquote_logged("ip link delete ".quotemeta($name)." 2>&1"); } }