diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-09-11 21:38:11 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2011-09-11 21:38:11 +0200 |
commit | 13cb667dc2c4131663e728bfc4bf3de465d52b20 (patch) | |
tree | b81475679207a5da2475d6dc146b387931627c38 /interface.c | |
parent | 924d9c4e48ed2044efe712eac9cd170f4da4b447 (diff) |
add a protocol event for link loss
Diffstat (limited to 'interface.c')
-rw-r--r-- | interface.c | 7 |
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; } } |