From: Felix Fietkau Date: Tue, 18 Oct 2011 17:17:05 +0000 (+0200) Subject: defer releasing the l3 dev so that the generic code can take care of cleaning system... X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fnetifd.git;a=commitdiff_plain;h=8527f455f6d35cf9e142cf9981b6553f0e239562;ds=sidebyside defer releasing the l3 dev so that the generic code can take care of cleaning system settings --- diff --git a/interface.c b/interface.c index 0a2afd0..5bbc0c3 100644 --- a/interface.c +++ b/interface.c @@ -280,6 +280,8 @@ interface_proto_cb(struct interface_proto_state *state, enum interface_proto_eve interface_handle_config_change(iface); if (iface->autostart) __interface_set_up(iface); + if (iface->l3_dev->dev) + device_release(iface->l3_dev); break; case IFPEV_LINK_LOST: if (iface->state != IFS_UP) diff --git a/proto-shell.c b/proto-shell.c index 68af69b..f197c62 100644 --- a/proto-shell.c +++ b/proto-shell.c @@ -125,10 +125,6 @@ proto_shell_teardown_cb(struct netifd_process *p, int ret) return; netifd_kill_process(&state->proto_task); - - if (state->l3_dev.dev) - device_remove_user(&state->l3_dev); - state->proto.proto_event(&state->proto, IFPEV_DOWN); }