]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
it helps to parse the io_submodule
authorAlan T. DeKok <aland@freeradius.org>
Tue, 17 Jan 2023 19:01:25 +0000 (14:01 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 17 Jan 2023 21:30:02 +0000 (16:30 -0500)
src/modules/rlm_tacacs/rlm_tacacs.c
src/modules/rlm_tacacs/rlm_tacacs.h

index a51247719896e5c7b62c62a8321fb7bcda1cd780..b19489d04a05579dc014e3a5a9f0b6068c8f916b 100644 (file)
@@ -47,6 +47,9 @@ static CONF_PARSER retry_config[] = {
  *     A mapping of configuration file names to internal variables.
  */
 static CONF_PARSER const module_config[] = {
+       { FR_CONF_OFFSET("transport", FR_TYPE_VOID, rlm_tacacs_t, io_submodule),
+         .func = module_rlm_submodule_parse },
+
        { FR_CONF_OFFSET("type", FR_TYPE_UINT32 | FR_TYPE_MULTI | FR_TYPE_NOT_EMPTY | FR_TYPE_REQUIRED, rlm_tacacs_t, types),
          .func = type_parse },
 
@@ -222,7 +225,7 @@ static int mod_bootstrap(module_inst_ctx_t const *mctx)
 
                code = inst->types[i];
                fr_assert(code > 0);
-               fr_assert(code < FR_TAC_PLUS_MAX);
+               fr_assert(code < FR_TACACS_PACKET_TYPE_MAX);
 
                inst->allowed[code] = true;
        }
index 0bf7005d211619a6be81ef92f2c480613d2ab701..8f7e503647f7eecfdd92639823d6f8f6845fb83b 100644 (file)
@@ -36,6 +36,8 @@
 typedef struct rlm_tacacs_s rlm_tacacs_t;
 typedef struct rlm_tacacs_io_s rlm_tacacs_io_t;
 
+#define FR_TACACS_PACKET_TYPE_MAX (10)
+
 /*
  *     Define a structure for our module configuration.
  */
@@ -54,7 +56,7 @@ struct rlm_tacacs_s {
 
        fr_retry_config_t       retry;                  //!< retries shared by all packet types
 
-       bool                    allowed[FR_TAC_PLUS_MAX];
+       bool                    allowed[FR_TACACS_PACKET_TYPE_MAX];
 
        fr_trunk_conf_t         trunk_conf;             //!< trunk configuration
 };