提交 52037657 编写于 作者: C Cole Robinson

Fix segfault if virtual network does not have a bridge name

上级 a3d570c7
Thu Dec 11 09:55:23 EST 2008 Cole Robinson <crobinso@redhat.com>
* src/netork_driver.c src/qemu_conf.c: Fix segfault if virtual
network does not have a bridge name.
Thu Dec 11 12:39:20 CET 2008 Daniel Veillard <veillard@redhat.com>
* src/domain_conf.c src/domain_conf.h src/qemu_conf.c
......
......@@ -1182,6 +1182,13 @@ static char *networkGetBridgeName(virNetworkPtr net) {
goto cleanup;
}
if (!(network->def->bridge)) {
networkReportError(net->conn, NULL, net, VIR_ERR_INTERNAL_ERROR,
_("network '%s' does not have a bridge name."),
network->def->name);
goto cleanup;
}
bridge = strdup(network->def->bridge);
if (!bridge)
networkReportError(net->conn, NULL, net, VIR_ERR_NO_MEMORY,
......
......@@ -549,9 +549,6 @@ qemudNetworkIfaceConnect(virConnectPtr conn,
virNetworkFree(network);
if (brname == NULL) {
qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
_("Network '%s' is not active"),
net->data.network.name);
goto error;
}
} else if (net->type == VIR_DOMAIN_NET_TYPE_BRIDGE) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册