On Nov 1, 2018, at 12:01 AM, Sam T <givemesam@gmail.com> wrote:
As an update, we are aiming for getting the actual Session-Timeout value from the reply or the difference in seconds between now() and the WISPr-Session-Terminate-Time - Whichever value is smaller
Here is the new output
Any tips would be much appreciated!
/// 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) {...} expand: %{reply:WISPr-Session-Terminate-Time} - %l -> 2000-11-01T12:22:23+00:00 - 1541009986
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.
WISPr-Session-Terminate-Time = "2000-11-01T12:22:23+00:00"
Note *also* that the termination year is 2000, or 18 years in the past. That has to be fixed, too. It MUST be in the future, otherwise the Session-Timeout will again be wrong. Alan DeKok.