char *config_buf;
char *script_name;
bool init_available;
- bool no_proto_task;
struct uci_blob_param_list config;
};
if (state->renew_pending)
proto_shell_handler(&state->proto,
PROTO_CMD_RENEW, false);
- else if (!state->handler->no_proto_task &&
+ else if (!(state->handler->proto.flags & PROTO_FLAG_NO_TASK) &&
!state->proto_task.uloop.pending &&
state->sm == S_SETUP)
proto_shell_handler(&state->proto,
return UBUS_STATUS_UNKNOWN_ERROR;
device_set_present(dev, true);
-
- interface_update_start(iface);
}
+ interface_update_start(iface, keep);
+
proto_apply_ip_settings(iface, data, addr_ext);
if ((cur = tb[NOTIFY_ROUTES]) != NULL)
interface_update_complete(state->proto.iface);
if ((state->sm != S_SETUP_ABORT) && (state->sm != S_TEARDOWN)) {
- if (!keep)
- state->proto.proto_event(&state->proto, IFPEV_UP);
+ state->proto.proto_event(&state->proto, IFPEV_UP);
state->sm = S_IDLE;
}
handler->proto.flags |= PROTO_FLAG_NODEV;
tmp = json_get_field(obj, "no-proto-task", json_type_boolean);
- handler->no_proto_task = tmp && json_object_get_boolean(tmp);
+ if (tmp && json_object_get_boolean(tmp))
+ handler->proto.flags |= PROTO_FLAG_NO_TASK;
tmp = json_get_field(obj, "available", json_type_boolean);
if (tmp && json_object_get_boolean(tmp))