Can I add extra fields to the radius accounting database?

Nicolas Baradakis nbk at sitadelle.com
Tue Sep 6 11:10:05 CEST 2005


Miguel Angel Quiles wrote:

>   I've got freeradius 1.0.2 on a SUSE 9.3. I was thinking if I
> could add a new field to the radius accounting. I'm using mysql.
> I already added the field to the radacct table in the radius
> database. And I've tried to modify the sql.conf file in the raddb
> directory. When I restart the service the freeradius won't start
> because off an error.

Posting the error messages would help a lot.

> I've created the field "TunnelType", and I added the values in the
> different queries, such as:
>
> accounting_update_query_alt = "INSERT into ${acct_table1} (AcctSessionId, 
> AcctUniqueId, UserName, Realm, NASIPAddress, NASPortId, NASPortType, 
> AcctStartTime, AcctSessionTime, AcctAuthentic, ConnectInfo_start, 
> AcctInputOctets, AcctOutputOctets, CalledStationId, CallingStationId, 
> ServiceType, FramedProtocol, FramedIPAddress, AcctStartDelay, TunnelType) 
> values('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', 
> '%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}', 
> '%{NAS-Port-Type}', DATE_SUB('%S',INTERVAL (%{Acct-Session-Time:-0} + 
> %{Acct-Delay-Time:-0}) SECOND), '%{Acct-Session-Time}', '%{Acct-Authentic}', 
> '', '%{Acct-Input-Octets}', '%{Acct-Output-Octets}', '%{Called-Station-Id}', 
> '%{Calling-Station-Id}', '%{Service-Type}', '%{Framed-Protocol}', 
> '%{Framed-IP-Address}', '0', '%{Tunnel-Type:0}')" 
                                             ^^
Did you try %{Tunnel-Type} ? (without the digit for the tag)

-- 
Nicolas Baradakis




More information about the Freeradius-Users mailing list