From: Nick Porter Date: Tue, 13 Feb 2024 16:48:08 +0000 (+0000) Subject: Align default attribute names with sample SQL X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aea8c2b12fa347ebfa65f4cb85c4cd95e798fb14;p=thirdparty%2Ffreeradius-server.git Align default attribute names with sample SQL And add quoting, needed to parse defaults correctly. --- diff --git a/raddb/mods-available/sqlcounter b/raddb/mods-available/sqlcounter index eec50ee9e91..68ca154e6bd 100644 --- a/raddb/mods-available/sqlcounter +++ b/raddb/mods-available/sqlcounter @@ -74,14 +74,14 @@ # reset_period_start_name:: The name of the attribute which is used to store the # time that the current reset period started. # -# The default is `&control.${.:instance}-Start` +# The default is `&control.${.:instance}-Reset-Start` # # Note because we are counting seconds, this attribute is of type `uint64`, and not `date`. # # reset_period_end_name:: The name of the attribute which is used to store the # time that the current reset period will end. # -# The default is `&control.${.:instance}-End` +# The default is `&control.${.:instance}-Reset-End` # # Note because we are counting seconds, this attribute is of type `uint64`, and not `date`. # diff --git a/src/modules/rlm_sqlcounter/rlm_sqlcounter.c b/src/modules/rlm_sqlcounter/rlm_sqlcounter.c index ed483e5393b..c434d5d4611 100644 --- a/src/modules/rlm_sqlcounter/rlm_sqlcounter.c +++ b/src/modules/rlm_sqlcounter/rlm_sqlcounter.c @@ -85,9 +85,9 @@ static const conf_parser_t module_config[] = { { FR_CONF_OFFSET_FLAGS("key", CONF_FLAG_NOT_EMPTY, rlm_sqlcounter_t, key), .dflt = "%{%{Stripped-User-Name} || %{User-Name}}", .quote = T_DOUBLE_QUOTED_STRING }, { FR_CONF_OFFSET_FLAGS("reset_period_start_name", CONF_FLAG_ATTRIBUTE, rlm_sqlcounter_t, start_attr), - .dflt = "&control.${.:instance}-Start" }, + .dflt = "&control.${.:instance}-Reset-Start", .quote = T_BARE_WORD }, { FR_CONF_OFFSET_FLAGS("reset_period_end_name", CONF_FLAG_ATTRIBUTE, rlm_sqlcounter_t, end_attr), - .dflt = "&control.${.:instance}-End" }, + .dflt = "&control.${.:instance}-Reset-End", .quote = T_BARE_WORD }, /* Attribute to write counter value to*/ { FR_CONF_OFFSET_FLAGS("counter_name", CONF_FLAG_ATTRIBUTE | CONF_FLAG_REQUIRED, rlm_sqlcounter_t, counter_attr) },