packets should have timestamps. If they don't, use the servers
idea of "now"
# The start time is: NOW - delay - session_length
#
# update request {
-# &FreeRADIUS-Acct-Session-Start-Time = "%{expr: %l - %{%{Acct-Session-Time}:-0} - %{%{Acct-Delay-Time}:-0}}"
+# &FreeRADIUS-Acct-Session-Start-Time = "%{expr: %{%{Event-Timestamp}:-%l} - %{%{Acct-Session-Time}:-0} - %{%{Acct-Delay-Time}:-0}}"
# }
+ #
+ # The packet should have a timestamp. If not, use "now" from the server.
+ #
+ if (!&Event-Timestamp) {
+ update request {
+ Event-Timestamp := "%l"
+ }
+ }
+
#
# Ensure that we have a semi-unique identifier for every
# request, as many NAS boxes are broken.