mirror of
git://git.proxmox.com/git/qemu-server.git
synced 2025-01-24 02:04:10 +03:00
fix #2697: map netdev_add options to correct json types
netdev_add is now a proper qmp command, which means that it verifies the parameter types properly instead of sending strings, we now have to choose the correct types for the parameters bool for vhost and uint64 for queues Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
ba76fc630b
commit
bf5aef9be3
@ -4065,6 +4065,14 @@ sub qemu_netdevadd {
|
||||
my $netdev = print_netdev_full($vmid, $conf, $arch, $device, $deviceid, 1);
|
||||
my %options = split(/[=,]/, $netdev);
|
||||
|
||||
if (defined(my $vhost = $options{vhost})) {
|
||||
$options{vhost} = JSON::boolean(PVE::JSONSchema::parse_boolean($vhost));
|
||||
}
|
||||
|
||||
if (defined(my $queues = $options{queues})) {
|
||||
$options{queues} = $queues + 0;
|
||||
}
|
||||
|
||||
mon_cmd($vmid, "netdev_add", %options);
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user