projects
/
project
/
netifd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
interface: call proto teardown before marking the interface as down
[project/netifd.git]
/
interface.c
diff --git
a/interface.c
b/interface.c
index
df04ce3
..
35f20b0
100644
(file)
--- a/
interface.c
+++ b/
interface.c
@@
-272,11
+272,14
@@
interface_check_state(struct interface *iface)
switch (iface->state) {
case IFS_UP:
if (!iface->enabled || !link_state) {
switch (iface->state) {
case IFS_UP:
if (!iface->enabled || !link_state) {
- mark_interface_down(iface);
interface_proto_event(iface->proto, PROTO_CMD_TEARDOWN, false);
interface_proto_event(iface->proto, PROTO_CMD_TEARDOWN, false);
+ mark_interface_down(iface);
}
break;
case IFS_DOWN:
}
break;
case IFS_DOWN:
+ if (!iface->available)
+ return;
+
if (iface->autostart && iface->enabled && link_state && !config_init)
__interface_set_up(iface);
break;
if (iface->autostart && iface->enabled && link_state && !config_init)
__interface_set_up(iface);
break;