summaryrefslogtreecommitdiffhomepage
path: root/interface.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-09-11 21:38:11 +0200
committerFelix Fietkau <nbd@openwrt.org>2011-09-11 21:38:11 +0200
commit13cb667dc2c4131663e728bfc4bf3de465d52b20 (patch)
treeb81475679207a5da2475d6dc146b387931627c38 /interface.c
parent924d9c4e48ed2044efe712eac9cd170f4da4b447 (diff)
add a protocol event for link loss
Diffstat (limited to 'interface.c')
-rw-r--r--interface.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/interface.c b/interface.c
index 72ecf4d..a5675f7 100644
--- a/interface.c
+++ b/interface.c
@@ -185,6 +185,13 @@ interface_proto_cb(struct interface_proto_state *state, enum interface_proto_eve
mark_interface_down(iface);
break;
+ case IFPEV_LINK_LOST:
+ if (iface->state != IFS_UP)
+ return;
+
+ iface->state = IFS_SETUP;
+ interface_event(iface, IFEV_DOWN);
+ break;
}
}