Document the new "reply-name" directive.
authornbk <nbk>
Sun, 5 Nov 2006 19:56:39 +0000 (19:56 +0000)
committernbk <nbk>
Sun, 5 Nov 2006 19:56:39 +0000 (19:56 +0000)
doc/rlm_sqlcounter
man/man5/rlm_counter.5
raddb/radiusd.conf.in

index 57857ed..b170e89 100644 (file)
@@ -25,6 +25,7 @@ with the following content (for mysql):
 sqlcounter noresetcounter {
                 counter-name = Max-All-Session-Time
                 check-name = Max-All-Session
+                reply-name = Session-Timeout
                 sqlmod-inst = sql
                 key = User-Name
                 reset = never
@@ -38,6 +39,7 @@ sqlcounter dailycounter {
                 driver = "rlm_sqlcounter"
                 counter-name = Daily-Session-Time
                 check-name = Max-Daily-Session
+                reply-name = Session-Timeout
                 sqlmod-inst = sqlcca3
                 key = User-Name
                 reset = daily
@@ -49,6 +51,7 @@ sqlcounter dailycounter {
 sqlcounter monthlycounter {
                 counter-name = Monthly-Session-Time
                 check-name = Max-Monthly-Session
+                reply-name = Session-Timeout
                 sqlmod-inst = sqlcca3
                 key = User-Name
                 reset = monthly
index f6274f8..2936b05 100644 (file)
@@ -44,6 +44,10 @@ syntax in the Users file to set a cap of 3600 seconds ( 8 hours ):
 DEFAULT Max-Daily-Session := 3600
 .DE
 .PP
+.IP reply-name
+This is the name of the attribute which will contain the remaining value for
+the counter in the reply packet when the user is successfully authorized. The
+default attribute name is "Session-Timeout".
 .IP allowed-servicetype
 This can be used to only apply the limitations to specific service types of
 sessions.  For example, setting this to Framed-User will only apply the counter
index 98eb2e3..33ad5dd 100644 (file)
@@ -1319,8 +1319,8 @@ $INCLUDE ${confdir}/eap.conf
        #  key.  The count is incremented when accounting packets are
        #  received by the server.  The value of the increment depends
        #  on the attribute type.
-       #  If the attribute is Acct-Session-Time or of an integer type we add the
-       #  value of the attribute. If it is anything else we increase the
+       #  If the attribute is Acct-Session-Time or of an integer type we add
+       #  the value of the attribute. If it is anything else we increase the
        #  counter by one.
        #
        #  The 'reset' parameter defines when the counters are all reset to
@@ -1357,8 +1357,8 @@ $INCLUDE ${confdir}/eap.conf
        #  the radius.log
        #  If the count attribute is Acct-Session-Time then on each login
        #  we send back the remaining online time as a Session-Timeout attribute
-       #  ELSE and if the return-attribute is set, we send back that attribute.
-       #  The return-attribute is set MUST be of an integer type
+       #  ELSE and if the reply-name is set, we send back that attribute.
+       #  The reply-name attribute MUST be of an integer type.
        #
        #  The counter-name can also be used instead of using the check-name
        #  like below:
@@ -1384,8 +1384,8 @@ $INCLUDE ${confdir}/eap.conf
                reset = daily
                counter-name = Daily-Session-Time
                check-name = Max-Daily-Session
+               reply-name = Session-Timeout
                allowed-servicetype = Framed-User
-               #return-attribute = Session-Timeout
                cache-size = 5000
        }
 
@@ -1436,6 +1436,7 @@ $INCLUDE ${confdir}/eap.conf
        sqlcounter dailycounter {
                counter-name = Daily-Session-Time
                check-name = Max-Daily-Session
+               reply-name = Session-Timeout
                sqlmod-inst = sql
                key = User-Name
                reset = daily
@@ -1484,6 +1485,7 @@ $INCLUDE ${confdir}/eap.conf
        sqlcounter monthlycounter {
                counter-name = Monthly-Session-Time
                check-name = Max-Monthly-Session
+               reply-name = Session-Timeout
                sqlmod-inst = sql
                key = User-Name
                reset = monthly