summaryrefslogtreecommitdiff
path: root/proto-shell.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-10-03 02:52:28 +0200
committerFelix Fietkau <nbd@openwrt.org>2011-10-03 02:52:28 +0200
commit086effa8d06c721a993d1d324b54f8dcc97f416e (patch)
tree0585f102e6e64354f51d9749ccdd6fc11f6d7c6a /proto-shell.c
parent9c0553eebbd86a78e098a2928b178effa31104e1 (diff)
downloadnetifd-086effa8d06c721a993d1d324b54f8dcc97f416e.tar.gz
proto-shell: remove the device user before issuing the protocol down event
Diffstat (limited to 'proto-shell.c')
-rw-r--r--proto-shell.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/proto-shell.c b/proto-shell.c
index 7eeff28..41031c3 100644
--- a/proto-shell.c
+++ b/proto-shell.c
@@ -138,9 +138,11 @@ proto_shell_teardown_cb(struct uloop_process *p, int ret)
struct proto_shell_state *state;
state = container_of(p, struct proto_shell_state, teardown_task);
- state->proto.proto_event(&state->proto, IFPEV_DOWN);
+
if (state->l3_dev.dev)
device_remove_user(&state->l3_dev);
+
+ state->proto.proto_event(&state->proto, IFPEV_DOWN);
}
static void