提交 e978774e 编写于 作者: D Daniel Veillard

* src/network_driver.c: enable bridges which are not up

  without an IP address, patch by Ludwig Nussel
Daniel
上级 6582d587
Tue May 12 17:25:52 CEST 2009 Daniel Veillard <veillard@redhat.com>
* src/network_driver.c: enable bridges which are not up, i.e.
without an IP address, patch by Ludwig Nussel
Mon May 11 16:25:22 BST 2009 Daniel P. Berrange <berrange@redhat.com> Mon May 11 16:25:22 BST 2009 Daniel P. Berrange <berrange@redhat.com>
* src/datatypes.c: Change hash destructors to call the internal * src/datatypes.c: Change hash destructors to call the internal
......
...@@ -836,8 +836,7 @@ static int networkStartNetworkDaemon(virConnectPtr conn, ...@@ -836,8 +836,7 @@ static int networkStartNetworkDaemon(virConnectPtr conn,
goto err_delbr; goto err_delbr;
} }
if (network->def->ipAddress && if ((err = brSetInterfaceUp(driver->brctl, network->def->bridge, 1))) {
(err = brSetInterfaceUp(driver->brctl, network->def->bridge, 1))) {
virReportSystemError(conn, err, virReportSystemError(conn, err,
_("failed to bring the bridge '%s' up"), _("failed to bring the bridge '%s' up"),
network->def->bridge); network->def->bridge);
...@@ -878,8 +877,7 @@ static int networkStartNetworkDaemon(virConnectPtr conn, ...@@ -878,8 +877,7 @@ static int networkStartNetworkDaemon(virConnectPtr conn,
networkRemoveIptablesRules(driver, network); networkRemoveIptablesRules(driver, network);
err_delbr1: err_delbr1:
if (network->def->ipAddress && if ((err = brSetInterfaceUp(driver->brctl, network->def->bridge, 0))) {
(err = brSetInterfaceUp(driver->brctl, network->def->bridge, 0))) {
char ebuf[1024]; char ebuf[1024];
networkLog(NETWORK_WARN, _("Failed to bring down bridge '%s' : %s\n"), networkLog(NETWORK_WARN, _("Failed to bring down bridge '%s' : %s\n"),
network->def->bridge, virStrerror(err, ebuf, sizeof ebuf)); network->def->bridge, virStrerror(err, ebuf, sizeof ebuf));
...@@ -920,8 +918,7 @@ static int networkShutdownNetworkDaemon(virConnectPtr conn, ...@@ -920,8 +918,7 @@ static int networkShutdownNetworkDaemon(virConnectPtr conn,
networkRemoveIptablesRules(driver, network); networkRemoveIptablesRules(driver, network);
char ebuf[1024]; char ebuf[1024];
if (network->def->ipAddress && if ((err = brSetInterfaceUp(driver->brctl, network->def->bridge, 0))) {
(err = brSetInterfaceUp(driver->brctl, network->def->bridge, 0))) {
networkLog(NETWORK_WARN, _("Failed to bring down bridge '%s' : %s\n"), networkLog(NETWORK_WARN, _("Failed to bring down bridge '%s' : %s\n"),
network->def->bridge, virStrerror(err, ebuf, sizeof ebuf)); network->def->bridge, virStrerror(err, ebuf, sizeof ebuf));
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册