Add indicator-flags to ubus and hotplug update-events
[project/netifd.git] / proto-shell.c
index 27fe265..1a69c19 100644 (file)
@@ -158,7 +158,6 @@ proto_shell_handler(struct interface_proto_state *proto,
                action = "setup";
                state->last_error = -1;
                proto_shell_clear_host_dep(state);
-               state->sm = S_SETUP;
        } else {
                if (state->sm == S_TEARDOWN)
                        return 0;
@@ -480,15 +479,15 @@ proto_shell_update_link(struct proto_shell_state *state, struct blob_attr *data,
        if ((cur = tb[NOTIFY_DNS_SEARCH]))
                interface_add_dns_search_list(&iface->proto_ip, cur);
 
+       if ((cur = tb[NOTIFY_DATA]))
+               proto_shell_parse_data(state->proto.iface, cur);
+
        interface_update_complete(state->proto.iface);
 
        if (!keep)
                state->proto.proto_event(&state->proto, IFPEV_UP);
        state->sm = S_IDLE;
 
-       if ((cur = tb[NOTIFY_DATA]))
-               proto_shell_parse_data(state->proto.iface, cur);
-
        return 0;
 }