Dynamic session timeout

Sam T givemesam at gmail.com
Thu Nov 1 21:32:22 CET 2018


Arg, were stuck. I thought we had your edit in here correctly. Here is the
entire expression and the output.

//////////

%{expr:%{%{integer:reply:WISPr-Session-Terminate-Time}} - %l}


  if (reply:WISPr-Session-Terminate-Time) {
            update reply {
        # Session-Timeout := "%{expr:%{WISPr-Session-Terminate-Time} - %l}"
        # Session-Timeout := "%{expr:%{reply:WISPr-Session-Terminate-Time}
- %l}"
        Session-Timeout :=
"%{expr:%{%{integer:reply:WISPr-Session-Terminate-Time}} - %l}"
            }
        }

/////////////

User-Password in the request is correct.
Login OK: [22-22-22-22-22-11/password] (from client wificpa port 0)
# Executing section post-auth from file
/etc/freeradius/sites-enabled/wifirush.rad
+- entering group post-auth {...}
++? if (reply:WISPr-Session-Terminate-Time)
? Evaluating (reply:WISPr-Session-Terminate-Time) -> TRUE
++? if (reply:WISPr-Session-Terminate-Time) -> TRUE
++- entering if (reply:WISPr-Session-Terminate-Time) {...}
Improperly nested variable; %{integer:reply:WISPr-Session-Terminate-Time}}
rlm_expr: xlat failed.
        expand: %{expr:%{%{integer:reply:WISPr-Session-Terminate-Time}} -
%l} ->
+++[reply] returns noop
++- if (reply:WISPr-Session-Terminate-Time) returns noop
Sending Access-Accept of id 0 to 96.227.97.217 port 54434
        WISPr-Bandwidth-Max-Up = 5000000
        WISPr-Bandwidth-Max-Down = 5000000
        Mikrotik-Rate-Limit = ""
        Acct-Interim-Interval = 300
        Session-Timeout = 0
        Idle-Timeout = 900
        WISPr-Session-Terminate-Time = "2018-11-02T12:22:23+00:00"
Finished request 0.
Going to the next request
Waking up in 4.9 seconds.
Cleaning up request 0 ID 0 with timestamp +4
Ready to process requests.

On Thu, Nov 1, 2018 at 11:03 AM Alan DeKok <aland at deployingradius.com>
wrote:

>
>
> > On Nov 1, 2018, at 1:58 PM, Sam T <givemesam at gmail.com> wrote:
> >
> > Hi!
> >
> > Thanks again for the help! the year 2000 was us playing with dates to see
> > if we can learn about out issue. We are getting this error:
> >
> > Improperly nested variable;
> %{integer:reply:WISPr-Session-Terminate-Time}}
> > rlm_expr: xlat failed.
>
>   You didn't use what I suggested.
>
>   Again:
>
> >>  OK, i't sprinting the session terminate time as a full date string.
> You
> >> can fix that by using:
> >>
> >>        %{expr:%{%{integer:reply:WISPr-Session-Terminate-Time}} - %l}
> >>
> >>  Which will print it as an integer.
>
>   Alan DeKok.
>
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html


More information about the Freeradius-Users mailing list