proto-shell: don't accept up-notifications in teardown state
authorSteven Barth <steven@midlink.org>
Thu, 24 Jul 2014 19:18:00 +0000 (21:18 +0200)
committerSteven Barth <steven@midlink.org>
Thu, 24 Jul 2014 19:18:00 +0000 (21:18 +0200)
Signed-off-by: Steven Barth <steven@midlink.org>
proto-shell.c

index 7e9cbcf05231fee8b2da19ac08fdf16fe31e1dad..d85a8d7e022bd2808c88b5d6afa0a5fd4c3bdfef 100644 (file)
@@ -432,7 +432,7 @@ proto_shell_update_link(struct proto_shell_state *state, struct blob_attr *data,
                return UBUS_STATUS_INVALID_ARGUMENT;
 
        up = blobmsg_get_bool(tb[NOTIFY_LINK_UP]);
-       if (!up) {
+       if (!up || state->sm == S_TEARDOWN) {
                state->proto.proto_event(&state->proto, IFPEV_LINK_LOST);
                return 0;
        }