mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-26 18:41:17 +00:00
* 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>
|
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,
|
|||||||
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,
|
|||||||
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,
|
|||||||
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));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user