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;
}
#include "netifd.h"
#include "ubus.h"
#include "config.h"
+#include "interface.h"
const char *main_path = ".";
static char **global_argv;
void netifd_restart(void)
{
+ interface_set_down(NULL);
uloop_timeout_set(&restart_timer, 1000);
}