From: Alan T. DeKok Date: Tue, 14 Feb 2023 12:56:45 +0000 (-0500) Subject: add state maching support for auth restart and auth error X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1a763af99a9d48393202f434fef62d09e7fb5724;p=thirdparty%2Ffreeradius-server.git add state maching support for auth restart and auth error --- diff --git a/src/process/tacacs/base.c b/src/process/tacacs/base.c index 6cb05b16f99..51026212fed 100644 --- a/src/process/tacacs/base.c +++ b/src/process/tacacs/base.c @@ -786,6 +786,16 @@ RESUME_NO_RCTX(auth_fail) RETURN_MODULE_OK; } +RESUME_NO_RCTX(auth_restart) +{ + process_tacacs_t const *inst = talloc_get_type_abort_const(mctx->inst->data, process_tacacs_t); + + PROCESS_TRACE; + + fr_state_discard(inst->auth.state_tree, request); + RETURN_MODULE_OK; +} + RESUME(auth_get) { process_tacacs_t const *inst = talloc_get_type_abort_const(mctx->inst->data, process_tacacs_t); @@ -1219,6 +1229,22 @@ static fr_process_state_t const process_state[] = { .resume = resume_auth_get, .section_offset = offsetof(process_tacacs_sections_t, auth_getuser), }, + [ FR_TACACS_CODE_AUTH_RESTART ] = { + .packet_type = { + }, + .rcode = RLM_MODULE_NOOP, + .send = send_generic, + .resume = resume_auth_restart, + .section_offset = offsetof(process_tacacs_sections_t, auth_restart), + }, + [ FR_TACACS_CODE_AUTH_ERROR ] = { + .packet_type = { + }, + .rcode = RLM_MODULE_NOOP, + .send = send_generic, + .resume = resume_auth_restart, + .section_offset = offsetof(process_tacacs_sections_t, auth_error), + }, [ FR_TACACS_CODE_AUTH_CONT ] = { .packet_type = {