rpms/libvirt/devel libvirt-0.7.0-handle-kernels-with-no-ipv6-support.patch, NONE, 1.1 libvirt.spec, 1.164, 1.165

Mark McLoughlin markmc at fedoraproject.org
Mon Aug 10 10:24:13 UTC 2009


Author: markmc

Update of /cvs/pkgs/rpms/libvirt/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv925

Modified Files:
	libvirt.spec 
Added Files:
	libvirt-0.7.0-handle-kernels-with-no-ipv6-support.patch 
Log Message:
* Mon Aug 10 2009 Mark McLoughlin <markmc at redhat.com> - 0.7.0-3
- Don't fail to start network if ipv6 modules is not loaded


libvirt-0.7.0-handle-kernels-with-no-ipv6-support.patch:
 network_driver.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

--- NEW FILE libvirt-0.7.0-handle-kernels-with-no-ipv6-support.patch ---
From: Mark McLoughlin <markmc at redhat.com>
Subject: [PATCH] Handle kernels with no ipv6 support

If the ipv6 kernel module is not loaded, then we get this when starting
a virtual network:

  libvir: Network Config error :
  cannot enable /proc/sys/net/ipv6/conf/virbr0/disable_ipv6:
  No such file or directory

If disable_ipv6 is not present, we should just merrily continue on our
way.

* src/network_driver.c: make networkDisableIPV6() not fail if the kernel
  has no ipv6 support
---
 src/network_driver.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/network_driver.c b/src/network_driver.c
index eaea454..84910ab 100644
--- a/src/network_driver.c
+++ b/src/network_driver.c
@@ -801,6 +801,12 @@ static int networkDisableIPV6(virConnectPtr conn,
         goto cleanup;
     }
 
+    if (access(field, W_OK) < 0 && errno == ENOENT) {
+        VIR_DEBUG("ipv6 appears to already be disabled on %s", network->def->bridge);
+        ret = 0;
+        goto cleanup;
+    }
+
     if (virFileWriteStr(field, "1") < 0) {
         virReportSystemError(conn, errno,
                              _("cannot enable %s"), field);
-- 
1.6.2.5



Index: libvirt.spec
===================================================================
RCS file: /cvs/pkgs/rpms/libvirt/devel/libvirt.spec,v
retrieving revision 1.164
retrieving revision 1.165
diff -u -p -r1.164 -r1.165
--- libvirt.spec	6 Aug 2009 15:01:49 -0000	1.164
+++ libvirt.spec	10 Aug 2009 10:24:12 -0000	1.165
@@ -78,7 +78,7 @@
 Summary: Library providing a simple API virtualization
 Name: libvirt
 Version: 0.7.0
-Release: 2%{?dist}%{?extra_release}
+Release: 3%{?dist}%{?extra_release}
 License: LGPLv2+
 Group: Development/Libraries
 Source: libvirt-%{version}.tar.gz
@@ -86,6 +86,9 @@ Source: libvirt-%{version}.tar.gz
 # Make sure qemu can access kernel/initrd (bug #516034)
 Patch01: libvirt-0.7.0-chown-kernel-initrd-before-spawning-qemu.patch
 
+# Don't fail to start network if ipv6 modules is not loaded
+Patch02: libvirt-0.7.0-handle-kernels-with-no-ipv6-support.patch
+
 # Temporary hack till PulseAudio autostart problems are sorted
 # out when SELinux enforcing (bz 486112)
 Patch200: libvirt-0.6.4-svirt-sound.patch
@@ -256,6 +259,7 @@ of recent versions of Linux (and other O
 %setup -q
 
 %patch01 -p1
+%patch02 -p1
 
 %patch200 -p0
 
@@ -617,6 +621,9 @@ fi
 %endif
 
 %changelog
+* Mon Aug 10 2009 Mark McLoughlin <markmc at redhat.com> - 0.7.0-3
+- Don't fail to start network if ipv6 modules is not loaded
+
 * Thu Aug  6 2009 Mark McLoughlin <markmc at redhat.com> - 0.7.0-2
 - Make sure qemu can access kernel/initrd (bug #516034)
 - Set perms on /var/lib/libvirt/boot to 0711 (bug #516034)




More information about the fedora-extras-commits mailing list