projects
/
project
/
netifd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c58e7f4
)
do not prematurely release the main dev on link loss, should fix DHCP NAK handling
author
Felix Fietkau
<nbd@openwrt.org>
Thu, 6 Sep 2012 14:53:50 +0000
(16:53 +0200)
committer
Felix Fietkau
<nbd@openwrt.org>
Thu, 6 Sep 2012 14:54:38 +0000
(16:54 +0200)
interface.c
patch
|
blob
|
history
diff --git
a/interface.c
b/interface.c
index
4a42ad9
..
2456227
100644
(file)
--- a/
interface.c
+++ b/
interface.c
@@
-170,8
+170,6
@@
interface_event(struct interface *iface, enum interface_event ev)
static void
interface_flush_state(struct interface *iface)
{
static void
interface_flush_state(struct interface *iface)
{
- if (iface->main_dev.dev)
- device_release(&iface->main_dev);
if (iface->l3_dev.dev)
device_release(&iface->l3_dev);
interface_data_flush(iface);
if (iface->l3_dev.dev)
device_release(&iface->l3_dev);
interface_data_flush(iface);
@@
-404,6
+402,8
@@
interface_proto_cb(struct interface_proto_state *state, enum interface_proto_eve
netifd_log_message(L_NOTICE, "Interface '%s' is now down\n", iface->name);
mark_interface_down(iface);
netifd_log_message(L_NOTICE, "Interface '%s' is now down\n", iface->name);
mark_interface_down(iface);
+ if (iface->main_dev.dev)
+ device_release(&iface->main_dev);
interface_handle_config_change(iface);
break;
case IFPEV_LINK_LOST:
interface_handle_config_change(iface);
break;
case IFPEV_LINK_LOST: