Proxying accounting to create a 'tee'

Fajar A. Nugraha fajar at fajar.net
Sun Aug 23 16:15:38 CEST 2009


On Sat, Aug 22, 2009 at 5:53 PM, Arran
Cudbard-Bell<a.cudbard-bell at sussex.ac.uk> wrote:
> Fajar A. Nugraha wrote:
>> In that setup, where does one get AcctStartTime and AcctStopTime values?

> Or just use whatever functions are available in your scripting environment.
>> - is it from the NAS?
>>
> No, the NAS doesn't include any timestamps.

Your answer is the complete opposite of Ivan's response :D So which
one is correct?

I'm using freeradius 2.1.6, and on sql/mysql/dialup.conf I found these lines:

        accounting_start_query = " \
          INSERT INTO ${acct_table1} \
            (acctsessionid,    acctuniqueid,     username, \
             realm,            nasipaddress,     nasportid, \
             nasporttype,      acctstarttime,    acctstoptime, \
             acctsessiontime,  acctauthentic,    connectinfo_start, \
             connectinfo_stop, acctinputoctets,  acctoutputoctets, \
             calledstationid,  callingstationid, acctterminatecause, \
             servicetype,      framedprotocol,   framedipaddress, \
             acctstartdelay,   acctstopdelay,    xascendsessionsvrkey) \
          VALUES \
            ('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', \
             '%{SQL-User-Name}', \
             '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}', \
             '%{NAS-Port-Type}', '%S', NULL, \
             '0', '%{Acct-Authentic}', '%{Connect-Info}', \
             '', '0', '0', \
             '%{Called-Station-Id}', '%{Calling-Station-Id}', '', \
             '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', \
             '%{%{Acct-Delay-Time}:-0}', '0', '%{X-Ascend-Session-Svr-Key}')"

I understand that most of them (like %{Acct-Session-Id} or
%{NAS-IP-Address}) should be attributes coming from the NAS, or
calculated by the radius from some attribute coming from the NAS, but
I cant find where "%S" that fills acctstarttime comes from.

-- 
Fajar



More information about the Freeradius-Users mailing list