From: Felix Fietkau Date: Mon, 3 Oct 2011 00:52:28 +0000 (+0200) Subject: proto-shell: remove the device user before issuing the protocol down event X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fnetifd.git;a=commitdiff_plain;h=086effa8d06c721a993d1d324b54f8dcc97f416e;ds=inline proto-shell: remove the device user before issuing the protocol down event --- 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