X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fnetifd.git;a=blobdiff_plain;f=interface.c;h=4b22807f4a4a1c0b6e568bfd00395292544b3b3f;hp=705bdd34f737b0b223bab31aaccc90f5771b1a05;hb=a323f3adf275954727f32895eea37bfcf0aa9fb7;hpb=838526ce765052bc1fe6c34cee3811027f519a14 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; }