Fix network persistence after define (bz #890492)

This commit is contained in:
Cole Robinson 2013-01-29 20:17:02 -05:00
parent 4084288dd5
commit 1b71b68bb9
2 changed files with 38 additions and 1 deletions

View File

@ -0,0 +1,31 @@
From bb19491cf5e3b78f2d72bbcbcc06e985d29b7f4b Mon Sep 17 00:00:00 2001
From: Peter Krempa <pkrempa@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

View File

@ -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@redhat.com> - 1.0.1-6
- Fix network persistence after define (bz #890492)
* Mon Jan 28 2013 Cole Robinson <crobinso@redhat.com> - 1.0.1-5
- CVE-2013-0170 libvirt: use-after-free in virNetMessageFree() (bz #893450, bz
#905173)