提交 ef38afcf 编写于 作者: D Daniel P. Berrange

Fixed stack overflow. Fixed bridge network

上级 ac2d00c4
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
......
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册