Dynamic session timeout

Alan DeKok aland at deployingradius.com
Thu Oct 25 18:15:08 CEST 2018


On Oct 24, 2018, at 2:09 PM, Sam T <givemesam at gmail.com> wrote:
> 
> Thank you so much for the reply. I'm working with my team and they tried to
> implement the unlang you shared with me. The result was a very negative
> value. We reversed it and it was the same but positive
> 
> 
>       if (reply:WISPr-Session-Terminate-Time) {
>         update reply {
>         Session-Timeout := "%{expr:%{WISPr-Session-Terminate-Time} - %l}"
>         }
>       }

  That's fine.

> They broke down for me what they are trying to do, maybe this can help us
> find tune the question
> 
> ### RULES
> 
> GET 'date/time now', 'WISPr-Session-Terminate-Time', and Session-Timeout;
> COMPARE 'date/time now' & 'WISPr-Session-Terminate-Time' and determine the
> difference in seconds as "session-timeout-delta";
> IF "session-timeout-delta" is less than Session-Timeout
> ACTION set Session-Timeout = "session-timeout-delta";
> 
> 
> Here are screen shots of the radius reply we received.

  Please don't post screen shots to the list.  It should be simple to cut & paste text.

> [image: image.png]
> 
> [image: image.png]
> 
> session timeout was reply'ed at = 1540400055
> should have been 3600?
> WISPr-Session-Terminate-Time = 2018-11-18T12:22:23+00:00

  I would have to see the debug output to know more.

  Alan DeKok.




More information about the Freeradius-Users mailing list