Fixed stack overflow. Fixed bridge network

This commit is contained in:
Daniel P. Berrange 2007-05-14 15:41:57 +00:00
parent ac2d00c498
commit ef38afcfd4
2 changed files with 13 additions and 1 deletions

View File

@ -1,3 +1,9 @@
Mon May 14 11:00:00 EST 2007 Daniel P. Berrange <berrange@redhat.com>
* qemud/conf.c: Fix initialization of var to prevent stack
overflow. Make sure we initialize the brCtl in case there
is no virtual network running
Thu May 11 10:20:00 EST 2007 Daniel P. Berrange <berrange@redhat.com>
* src/xm_internal.c: Fix boot device XML syntax

View File

@ -246,7 +246,7 @@ static int qemudExtractVersionInfo(const char *qemu, int *version, int *flags) {
_exit(-1); /* Just in case */
} else { /* Parent */
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;
if (close(newstdout[1]) < 0)
@ -1152,6 +1152,12 @@ qemudNetworkIfaceConnect(struct qemud_server *server,
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,