diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-09-11 11:15:39 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2011-09-11 11:15:39 +0200 |
commit | a323f3adf275954727f32895eea37bfcf0aa9fb7 (patch) | |
tree | 59ee4995c1bb29aa925f83fc1ccea68493ef03fe /interface.c | |
parent | 838526ce765052bc1fe6c34cee3811027f519a14 (diff) |
bring all interfaces down on restart
Diffstat (limited to 'interface.c')
-rw-r--r-- | interface.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/interface.c b/interface.c index 705bdd3..4b22807 100644 --- a/interface.c +++ b/interface.c @@ -312,8 +312,13 @@ interface_set_up(struct interface *iface) int interface_set_down(struct interface *iface) { - iface->autostart = false; - __interface_set_down(iface, false); + if (!iface) { + list_for_each_entry(iface, &interfaces, list) + __interface_set_down(iface, false); + } else { + iface->autostart = false; + __interface_set_down(iface, false); + } return 0; } |