]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Align default attribute names with sample SQL
authorNick Porter <nick@portercomputing.co.uk>
Tue, 13 Feb 2024 16:48:08 +0000 (16:48 +0000)
committerNick Porter <nick@portercomputing.co.uk>
Thu, 15 Feb 2024 16:32:34 +0000 (16:32 +0000)
And add quoting, needed to parse defaults correctly.

raddb/mods-available/sqlcounter
src/modules/rlm_sqlcounter/rlm_sqlcounter.c

index eec50ee9e91c6ab923b7908646c20cf88581d16c..68ca154e6bde5a983c18c57a186f814430f6a0ee 100644 (file)
 #  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`.
 #
index ed483e5393be540a1c3f1ff3b28c9ea03c029f33..c434d5d46110a811ea0b0f849571d34e3d489572 100644 (file)
@@ -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) },