diff options
| author | Thomas Huth | 2020-05-27 17:31:52 +0200 |
|---|---|---|
| committer | Michael S. Tsirkin | 2020-06-12 16:17:06 +0200 |
| commit | 00823980b296c80a3ff7b448df20c48897cd62e9 (patch) | |
| tree | cd0bde968145d9c03a5d9cd3a797a7d1349be3af /include/hw/virtio | |
| parent | libvhost-user: advertise vring features (diff) | |
| download | qemu-00823980b296c80a3ff7b448df20c48897cd62e9.tar.gz qemu-00823980b296c80a3ff7b448df20c48897cd62e9.tar.xz qemu-00823980b296c80a3ff7b448df20c48897cd62e9.zip | |
hw/pci: Fix crash when running QEMU with "-nic model=rocker"
QEMU currently aborts when being started with "-nic model=rocker" or with
"-net nic,model=rocker". This happens because the "rocker" device is not
a normal NIC but a switch, which has different properties. Thus we should
only consider real NIC devices for "-nic" and "-net". These devices can
be identified by the "netdev" property, so check for this property before
adding the device to the list.
Reported-by: Michael Tokarev <mjt@tls.msk.ru>
Fixes: 52310c3fa7dc854d ("net: allow using any PCI NICs in -net or -nic")
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20200527153152.9211-1-thuth@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/hw/virtio')
0 files changed, 0 insertions, 0 deletions
