mirror of https://gitee.com/openkylin/libvirt.git
* src/network_driver.c: enable bridges which are not up
without an IP address, patch by Ludwig Nussel Daniel
This commit is contained in:
parent
6582d5872d
commit
e978774ec6
|
@ -1,3 +1,8 @@
|
|||
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>
|
||||
|
||||
* src/datatypes.c: Change hash destructors to call the internal
|
||||
|
|
|
@ -836,8 +836,7 @@ static int networkStartNetworkDaemon(virConnectPtr conn,
|
|||
goto err_delbr;
|
||||
}
|
||||
|
||||
if (network->def->ipAddress &&
|
||||
(err = brSetInterfaceUp(driver->brctl, network->def->bridge, 1))) {
|
||||
if ((err = brSetInterfaceUp(driver->brctl, network->def->bridge, 1))) {
|
||||
virReportSystemError(conn, err,
|
||||
_("failed to bring the bridge '%s' up"),
|
||||
network->def->bridge);
|
||||
|
@ -878,8 +877,7 @@ static int networkStartNetworkDaemon(virConnectPtr conn,
|
|||
networkRemoveIptablesRules(driver, network);
|
||||
|
||||
err_delbr1:
|
||||
if (network->def->ipAddress &&
|
||||
(err = brSetInterfaceUp(driver->brctl, network->def->bridge, 0))) {
|
||||
if ((err = brSetInterfaceUp(driver->brctl, network->def->bridge, 0))) {
|
||||
char ebuf[1024];
|
||||
networkLog(NETWORK_WARN, _("Failed to bring down bridge '%s' : %s\n"),
|
||||
network->def->bridge, virStrerror(err, ebuf, sizeof ebuf));
|
||||
|
@ -920,8 +918,7 @@ static int networkShutdownNetworkDaemon(virConnectPtr conn,
|
|||
networkRemoveIptablesRules(driver, network);
|
||||
|
||||
char ebuf[1024];
|
||||
if (network->def->ipAddress &&
|
||||
(err = brSetInterfaceUp(driver->brctl, network->def->bridge, 0))) {
|
||||
if ((err = brSetInterfaceUp(driver->brctl, network->def->bridge, 0))) {
|
||||
networkLog(NETWORK_WARN, _("Failed to bring down bridge '%s' : %s\n"),
|
||||
network->def->bridge, virStrerror(err, ebuf, sizeof ebuf));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue