Fixed stack overflow. Fixed bridge network when no virtual net is running

This commit is contained in:
Daniel P. Berrange 2007-05-14 15:38:15 +00:00
parent a05e64b718
commit 338630edc8
3 changed files with 28 additions and 5 deletions

View File

@ -0,0 +1,17 @@
diff -rup libvirt-0.2.2/qemud/conf.c libvirt-0.2.2.new/qemud/conf.c
--- libvirt-0.2.2/qemud/conf.c 2007-05-14 10:38:52.000000000 -0400
+++ libvirt-0.2.2.new/qemud/conf.c 2007-05-14 10:38:34.000000000 -0400
@@ -1151,6 +1151,12 @@ qemudNetworkIfaceConnect(struct qemud_se
goto error;
}
+ if (!server->brctl && (err = brInit(&server->brctl))) {
+ qemudReportError(server, VIR_ERR_INTERNAL_ERROR,
+ "cannot initialize bridge support: %s", strerror(err));
+ goto error;
+ }
+
if ((err = brAddTap(server->brctl, brname,
ifname, BR_IFNAME_MAXLEN, &tapfd))) {
qemudReportError(server, VIR_ERR_INTERNAL_ERROR,
Only in libvirt-0.2.2.new/qemud: conf.c.orig

View File

@ -1,13 +1,14 @@
diff -rup libvirt-0.2.2/qemud/conf.c libvirt-0.2.2.new/qemud/conf.c diff -rup libvirt-0.2.2/qemud/conf.c libvirt-0.2.2.new/qemud/conf.c
--- libvirt-0.2.2/qemud/conf.c 2007-04-17 04:34:42.000000000 -0400 --- libvirt-0.2.2/qemud/conf.c 2007-04-17 04:34:42.000000000 -0400
+++ libvirt-0.2.2.new/qemud/conf.c 2007-05-01 18:16:46.000000000 -0400 +++ libvirt-0.2.2.new/qemud/conf.c 2007-05-14 10:36:12.000000000 -0400
@@ -245,21 +245,25 @@ static int qemudExtractVersionInfo(const @@ -245,21 +245,25 @@ static int qemudExtractVersionInfo(const
cleanup1: cleanup1:
_exit(-1); /* Just in case */ _exit(-1); /* Just in case */
} else { /* Parent */ } else { /* Parent */
- char help[4096]; /* Ought to be enough to hold QEMU help screen */ - char help[4096]; /* Ought to be enough to hold QEMU help screen */
- int got, ret = -1;
+ char help[8192]; /* Ought to be enough to hold QEMU help screen */ + char help[8192]; /* Ought to be enough to hold QEMU help screen */
int got, ret = -1; + int got = 0, ret = -1;
int major, minor, micro; int major, minor, micro;
if (close(newstdout[1]) < 0) if (close(newstdout[1]) < 0)
@ -107,7 +108,7 @@ diff -rup libvirt-0.2.2/qemud/conf.c libvirt-0.2.2.new/qemud/conf.c
goto no_memory; goto no_memory;
diff -rup libvirt-0.2.2/qemud/internal.h libvirt-0.2.2.new/qemud/internal.h diff -rup libvirt-0.2.2/qemud/internal.h libvirt-0.2.2.new/qemud/internal.h
--- libvirt-0.2.2/qemud/internal.h 2007-04-11 10:13:36.000000000 -0400 --- libvirt-0.2.2/qemud/internal.h 2007-04-11 10:13:36.000000000 -0400
+++ libvirt-0.2.2.new/qemud/internal.h 2007-05-01 17:53:42.000000000 -0400 +++ libvirt-0.2.2.new/qemud/internal.h 2007-05-14 10:36:02.000000000 -0400
@@ -161,6 +161,7 @@ enum qemud_vm_grapics_type { @@ -161,6 +161,7 @@ enum qemud_vm_grapics_type {
enum qemud_cmd_flags { enum qemud_cmd_flags {
QEMUD_CMD_FLAG_KQEMU = 1, QEMUD_CMD_FLAG_KQEMU = 1,
@ -125,4 +126,3 @@ diff -rup libvirt-0.2.2/qemud/internal.h libvirt-0.2.2.new/qemud/internal.h
struct qemud_vm_os_def os; struct qemud_vm_os_def os;
int features; int features;
Only in libvirt-0.2.2.new/qemud: libvirt-0.2.2-qemu-noreboot.patch

View File

@ -9,7 +9,7 @@
Summary: Library providing a simple API virtualization Summary: Library providing a simple API virtualization
Name: libvirt Name: libvirt
Version: 0.2.2 Version: 0.2.2
Release: 3%{?_extra_release} Release: 4%{?_extra_release}
License: LGPL License: LGPL
Group: Development/Libraries Group: Development/Libraries
Source: libvirt-%{version}.tar.gz Source: libvirt-%{version}.tar.gz
@ -18,6 +18,7 @@ Patch2: libvirt-0.2.2-dnsmasq-order.patch
Patch3: libvirt-0.2.2-qemu-noreboot.patch Patch3: libvirt-0.2.2-qemu-noreboot.patch
Patch4: libvirt-0.2.2-sync-daemon-restart.patch Patch4: libvirt-0.2.2-sync-daemon-restart.patch
Patch5: libvirt-0.2.2-graphics-hvm.patch Patch5: libvirt-0.2.2-graphics-hvm.patch
Patch6: libvirt-0.2.2-bridge-init.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRoot: %{_tmppath}/%{name}-%{version}-root
URL: http://libvirt.org/ URL: http://libvirt.org/
BuildRequires: python python-devel BuildRequires: python python-devel
@ -69,6 +70,7 @@ of recent versions of Linux (and other OSes).
%patch3 -p1 %patch3 -p1
%patch4 -p1 %patch4 -p1
%patch5 -p1 %patch5 -p1
%patch6 -p1
%build %build
%configure --with-init-script=redhat --with-qemud-pid-file=%{_localstatedir}/run/libvirt_qemud.pid %configure --with-init-script=redhat --with-qemud-pid-file=%{_localstatedir}/run/libvirt_qemud.pid
@ -180,6 +182,10 @@ fi
%doc docs/examples/python %doc docs/examples/python
%changelog %changelog
* Mon May 14 2007 Daniel P. Berrange <berrange@redhat.com> - 0.2.2-4.fc7
- Fixed uninitialized value causing stack overflow
- Fixed bridged networking when no virtual network is defined (bz 239273)
* Thu May 3 2007 Daniel P. Berrange <berrange@redhat.com> - 0.2.2-3.fc7 * Thu May 3 2007 Daniel P. Berrange <berrange@redhat.com> - 0.2.2-3.fc7
- Fixed init script restart race - Fixed init script restart race
- Remove duplicate <graphics> tag for HVM - Remove duplicate <graphics> tag for HVM