[RADIATOR] Timestamp attribute

Michael ringo at vianet.ca
Thu Dec 1 11:37:59 CST 2011

The Timestamp attribute as per radiator docs is the system time when packet is received, adjusted by ACCT_DELAY_TIME to give a more accurate time for which the event happened.  Radiator seems to add this attribute in the Handler.pm:

     if ($p->code eq 'Accounting-Request')
         # Add a pseudo attribute for the Timestamp
         # (adjusted by Delay-Time)
         # Some modules (AuthSQL) and logfile scripts rely on it
                      - int $p->getAttrByNum($Radius::Radius::ACCT_DELAY_TIME));

Two issues I had were:
1. Since this Timestamp attr is added in the Handler processing, special characters such as %f and %g which reference the timestamp are not available with any processing that happens before the Handler.
2. Since it is only added to 'Accounting-Request', special characters such as %f and %g are not available at all for the AuthLog processing since it is a time when an 'Authentication-Request' is being processed.

These issues for me were easily resolved by adding the Timestamp with a ClientHook for all packets, but I thought i would mention it for consideration of adding the Timestamp sooner, and possibly for auth and acct packets.


More information about the radiator mailing list