mirror of
git://git.proxmox.com/git/qemu-server.git
synced 2025-03-12 20:58:26 +03:00
fix #2114: set correct link status on hotplug
we also need to set the link status if the whole device changed, otherwise a change of macaddress allows a network connection even if link_down is set to 1 Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
bd772c2e87
commit
79046fd12e
@ -4140,7 +4140,10 @@ sub vm_deviceplug {
|
||||
|
||||
my $netdevicefull = print_netdevice_full($vmid, $conf, $device, $deviceid, undef, $use_old_bios_files, $arch, $machine_type);
|
||||
qemu_deviceadd($vmid, $netdevicefull);
|
||||
eval { qemu_deviceaddverify($vmid, $deviceid); };
|
||||
eval {
|
||||
qemu_deviceaddverify($vmid, $deviceid);
|
||||
qemu_set_link_status($vmid, $deviceid, !$device->{link_down});
|
||||
};
|
||||
if (my $err = $@) {
|
||||
eval { qemu_netdevdel($vmid, $deviceid); };
|
||||
warn $@ if $@;
|
||||
|
Loading…
x
Reference in New Issue
Block a user