Fix to restrict live deletion to virtual network devices

https://github.com/webmin/webmin/pull/2795
This commit is contained in:
Ilia Ross
2026-08-10 23:09:09 +02:00
parent 95cb100e8b
commit cceda25a60

View File

@@ -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");
}
}