diff options
author | Matthias Maier <tamiko@gentoo.org> | 2018-03-23 09:00:39 -0500 |
---|---|---|
committer | Matthias Maier <tamiko@gentoo.org> | 2018-03-23 09:05:58 -0500 |
commit | 68fdb138b9730d532c38cdf6fcef2a36f37a92cb (patch) | |
tree | 0c29dc4d7580a52f22812b30abc9b9b3c5028c85 /app-emulation/libvirt/files | |
parent | app-eselect/eselect-repository: Bump to v3 (diff) | |
download | gentoo-68fdb138b9730d532c38cdf6fcef2a36f37a92cb.tar.gz gentoo-68fdb138b9730d532c38cdf6fcef2a36f37a92cb.tar.bz2 gentoo-68fdb138b9730d532c38cdf6fcef2a36f37a92cb.zip |
app-emulation/libvirt: 4.1.0-r2: Apply upstream patch for bridge support
Apply an upstream patch to reenable bridge support even if
USE=-virt-network and automatic network support is compiled out of
libvirt
Thanks to Agostino Sarubbo for upstream report and mentioning the
upstream patch.
Patch: https://www.redhat.com/archives/libvir-list/2018-March/msg01461.html
Bug: https://bugs.gentoo.org/650660
Bug: https://bugs.gentoo.org/650872
Package-Manager: Portage-2.3.24, Repoman-2.3.6
Diffstat (limited to 'app-emulation/libvirt/files')
-rw-r--r-- | app-emulation/libvirt/files/libvirt-4.1.0-unbreak_my_bridge.patch | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/app-emulation/libvirt/files/libvirt-4.1.0-unbreak_my_bridge.patch b/app-emulation/libvirt/files/libvirt-4.1.0-unbreak_my_bridge.patch new file mode 100644 index 000000000000..c4d24ec020b1 --- /dev/null +++ b/app-emulation/libvirt/files/libvirt-4.1.0-unbreak_my_bridge.patch @@ -0,0 +1,78 @@ +[PATCH] conf: avoid reporting errors when network driver is disabled + +In previous releases all these methods were a no-op if the network +driver is disabled. These helper methods are called unconditionally for +all types of network interface, so must be no-ops if missing. Other code +will already generate an error if the network driver is disabled and a +NIC with type=network is used. + +Signed-off-by: Daniel P. Berrangé <berrange redhat com> +--- + src/conf/domain_conf.c | 23 +++++++++-------------- + 1 file changed, 9 insertions(+), 14 deletions(-) + +diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c +index c8d051fa9f..79d6bd378e 100644 +--- a/src/conf/domain_conf.c ++++ b/src/conf/domain_conf.c +@@ -28979,10 +28979,13 @@ int + virDomainNetAllocateActualDevice(virDomainDefPtr dom, + virDomainNetDefPtr iface) + { ++ /* Just silently ignore if network driver isn't present. If something ++ * has tried to use a NIC with type=network, other code will already ++ * cause an error. This ensures type=bridge doesn't break when ++ * network driver is compiled out. ++ */ + if (!netAllocate) { +- virReportError(VIR_ERR_NO_SUPPORT, "%s", +- _("Network device allocation not available")); +- return -1; ++ return 0; + } + + return netAllocate(dom, iface); +@@ -28993,8 +28996,6 @@ virDomainNetNotifyActualDevice(virDomainDefPtr dom, + virDomainNetDefPtr iface) + { + if (!netNotify) { +- virReportError(VIR_ERR_NO_SUPPORT, "%s", +- _("Network device notification not available")); + return; + } + +@@ -29007,9 +29008,7 @@ virDomainNetReleaseActualDevice(virDomainDefPtr dom, + virDomainNetDefPtr iface) + { + if (!netRelease) { +- virReportError(VIR_ERR_NO_SUPPORT, "%s", +- _("Network device release not available")); +- return -1; ++ return 0; + } + + return netRelease(dom, iface); +@@ -29020,9 +29019,7 @@ virDomainNetBandwidthChangeAllowed(virDomainNetDefPtr iface, + virNetDevBandwidthPtr newBandwidth) + { + if (!netBandwidthChangeAllowed) { +- virReportError(VIR_ERR_NO_SUPPORT, "%s", +- _("Network device bandwidth change query not available")); +- return -1; ++ return 0; + } + + return netBandwidthChangeAllowed(iface, newBandwidth); +@@ -29033,9 +29030,7 @@ virDomainNetBandwidthUpdate(virDomainNetDefPtr iface, + virNetDevBandwidthPtr newBandwidth) + { + if (!netBandwidthUpdate) { +- virReportError(VIR_ERR_NO_SUPPORT, "%s", +- _("Network device bandwidth update not available")); +- return -1; ++ return 0; + } + + return netBandwidthUpdate(iface, newBandwidth); +-- +2.14.3 |