projects
/
project
/
netifd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
838526c
)
bring all interfaces down on restart
author
Felix Fietkau
<nbd@openwrt.org>
Sun, 11 Sep 2011 09:15:39 +0000
(11:15 +0200)
committer
Felix Fietkau
<nbd@openwrt.org>
Sun, 11 Sep 2011 09:15:39 +0000
(11:15 +0200)
interface.c
patch
|
blob
|
history
main.c
patch
|
blob
|
history
diff --git
a/interface.c
b/interface.c
index
705bdd3
..
4b22807
100644
(file)
--- a/
interface.c
+++ b/
interface.c
@@
-312,8
+312,13
@@
interface_set_up(struct interface *iface)
int
interface_set_down(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;
}
return 0;
}
diff --git
a/main.c
b/main.c
index
da5ae09
..
7d7bfcb
100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-6,6
+6,7
@@
#include "netifd.h"
#include "ubus.h"
#include "config.h"
#include "netifd.h"
#include "ubus.h"
#include "config.h"
+#include "interface.h"
const char *main_path = ".";
static char **global_argv;
const char *main_path = ".";
static char **global_argv;
@@
-21,6
+22,7
@@
static struct uloop_timeout restart_timer = {
void netifd_restart(void)
{
void netifd_restart(void)
{
+ interface_set_down(NULL);
uloop_timeout_set(&restart_timer, 1000);
}
uloop_timeout_set(&restart_timer, 1000);
}