From: Nick Porter Date: Wed, 30 Aug 2023 09:12:23 +0000 (+0100) Subject: Add min_challenge_len to CHAP module config X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f3481904b3636f20717ef2f5904eabd0e5a06d68;p=thirdparty%2Ffreeradius-server.git Add min_challenge_len to CHAP module config Un-documented as it should only be changed to handle insane client devices. --- diff --git a/src/modules/rlm_chap/rlm_chap.c b/src/modules/rlm_chap/rlm_chap.c index b504f72f38b..0aaed886e32 100644 --- a/src/modules/rlm_chap/rlm_chap.c +++ b/src/modules/rlm_chap/rlm_chap.c @@ -33,8 +33,14 @@ RCSID("$Id$") typedef struct { fr_dict_enum_value_t *auth_type; + size_t min_challenge_len; } rlm_chap_t; +static const CONF_PARSER module_config[] = { + { FR_CONF_OFFSET("min_challenge_len", FR_TYPE_SIZE, rlm_chap_t, min_challenge_len), .dflt = "16" }, + CONF_PARSER_TERMINATOR +}; + static fr_dict_t const *dict_freeradius; static fr_dict_t const *dict_radius; @@ -321,6 +327,7 @@ module_rlm_t rlm_chap = { .inst_size = sizeof(rlm_chap_t), .onload = mod_load, .unload = mod_unload, + .config = module_config, .instantiate = mod_instantiate }, .dict = &dict_radius,