virt-manager/0005-osdict-Don-t-return-virtio1.0-net-as-a-valid-device-.patch
Cole Robinson f191876fc7 Fix version check for spice GL support
Don't return virtio1.0-net as a valid device name (bz #1399083)
Fix window size tracking on wayland (bz #1375175)
Fix 'resize to VM' on wayland (bz #1397598)
2016-12-13 13:53:12 -05:00

28 lines
977 B
Diff

From: Cole Robinson <crobinso@redhat.com>
Date: Tue, 13 Dec 2016 12:58:14 -0500
Subject: [PATCH virt-manager] osdict: Don't return virtio1.0-net as a valid
device name (bug 1399083)
We can't depend on libosinfo device names being valid libvirt network
model names, so use a whitelist
https://bugzilla.redhat.com/show_bug.cgi?id=1399083
(cherry picked from commit 617b92710f50015c5df5f9db15d25de18867957d)
---
virtinst/osdict.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/virtinst/osdict.py b/virtinst/osdict.py
index bfc435b..7e4ead2 100644
--- a/virtinst/osdict.py
+++ b/virtinst/osdict.py
@@ -453,7 +453,7 @@ class _OsVariant(object):
devs = self._os.get_all_devices(fltr)
for idx in range(devs.get_length()):
devname = devs.get_nth(idx).get_name()
- if devname != "virtio-net":
+ if devname in ["pcnet", "ne2k_pci", "rtl8139", "e1000"]:
return devname
return None