[libvirt] Fix network persistence after define (bz #890492)

Cole Robinson crobinso at fedoraproject.org
Wed Jan 30 01:17:08 UTC 2013


commit 1b71b68bb9af8ac0ceb0c4cf8bb74a58eed30921
Author: Cole Robinson <crobinso at redhat.com>
Date:   Tue Jan 29 20:17:02 2013 -0500

    Fix network persistence after define (bz #890492)

 ...dge-Fix-regression-when-defining-persiste.patch |   31 ++++++++++++++++++++
 libvirt.spec                                       |    8 ++++-
 2 files changed, 38 insertions(+), 1 deletions(-)
---
diff --git a/0001-network-bridge-Fix-regression-when-defining-persiste.patch b/0001-network-bridge-Fix-regression-when-defining-persiste.patch
new file mode 100644
index 0000000..a6fec9f
--- /dev/null
+++ b/0001-network-bridge-Fix-regression-when-defining-persiste.patch
@@ -0,0 +1,31 @@
+From bb19491cf5e3b78f2d72bbcbcc06e985d29b7f4b Mon Sep 17 00:00:00 2001
+From: Peter Krempa <pkrempa at redhat.com>
+Date: Fri, 11 Jan 2013 11:10:34 +0100
+Subject: [PATCH] network: bridge: Fix regression when defining persistent
+ networks
+
+Commit 0211fd6e04cdc402da20818df54299c6ded3d3cb introduced regression
+where newly defined networks were not made persistent.
+
+This patch makes the network persistent on each successful definition.
+---
+ src/network/bridge_driver.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
+index 660c38d..975b7f6 100644
+--- a/src/network/bridge_driver.c
++++ b/src/network/bridge_driver.c
+@@ -3124,6 +3124,9 @@ static virNetworkPtr networkDefine(virConnectPtr conn, const char *xml) {
+             goto cleanup;
+     }
+ 
++    /* define makes the network persistent - always */
++    network->persistent = 1;
++
+     /* def was asigned */
+     freeDef = false;
+ 
+-- 
+1.8.1
+
diff --git a/libvirt.spec b/libvirt.spec
index 6a4ee70..c55328d 100644
--- a/libvirt.spec
+++ b/libvirt.spec
@@ -341,7 +341,7 @@
 Summary: Library providing a simple virtualization API
 Name: libvirt
 Version: 1.0.1
-Release: 5%{?dist}%{?extra_release}
+Release: 6%{?dist}%{?extra_release}
 License: LGPLv2+
 Group: Development/Libraries
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
@@ -356,6 +356,8 @@ Patch2: %{name}-%{version}-build-further-fixes-for-broken-if_bridge.h.patch
 # CVE-2013-0170 libvirt: use-after-free in virNetMessageFree() (bz
 # 893450, bz 905173)
 Patch3: 0001-rpc-Fix-crash-on-error-paths-of-message-dispatching.patch
+# Fix network persistence after define (bz 890492)
+Patch4: 0001-network-bridge-Fix-regression-when-defining-persiste.patch
 
 %if %{with_libvirtd}
 Requires: libvirt-daemon = %{version}-%{release}
@@ -1092,6 +1094,7 @@ of recent versions of Linux (and other OSes).
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
 
 %build
 %if ! %{with_xen}
@@ -2002,6 +2005,9 @@ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/sysctl.d/libvirtd
 %endif
 
 %changelog
+* Tue Jan 29 2013 Cole Robinson <crobinso at redhat.com> - 1.0.1-6
+- Fix network persistence after define (bz #890492)
+
 * Mon Jan 28 2013 Cole Robinson <crobinso at redhat.com> - 1.0.1-5
 - CVE-2013-0170 libvirt: use-after-free in virNetMessageFree() (bz #893450, bz
   #905173)


More information about the scm-commits mailing list