Can translation of RADIUS packet attributes (e.g., NAS-Port-Type) be configured?
Jack Patmos
jack.patmos at googlemail.com
Wed Aug 17 10:56:14 CEST 2011
I am running FreeRADIUS 2.1.7.
I am attempting to write accounting data to Postgres database. In the
database the NAS port type from the request is stored as the integer
value that defines the port type in RFC2865 (e.g., 19 - 'Wireless -
IEEE 802.11'). The database table is fixed and cannot be changed.
When I send a test packet from radclient that contains a port type:
Called-Station-Id = "xx-xx-xx-xx-xx-xx"
User-Name = "REALM/user"
Framed-IP-Address = xxx.xxx.xxx.xxx
NAS-IP-Address = xxx.xxx.xxx.xxx
NAS-Port-Type = 19
[...]
Then when it is received by the server the port type has always been
translated into its string value:
rad_recv: Accounting-Request packet from host 127.0.0.1 port 54361,
id=245, length=262
Called-Station-Id = "xx-xx-xx-xx-xx-xx"
User-Name = "REALM/user"
Framed-IP-Address = xxx.xxx.xxx.xxx
NAS-IP-Address = xxx.xxx.xxx.xxx
NAS-Port-Type = Wireless-802.11
Acct-Status-Type = Start
[....]
+- entering group preacct {...}
++[preprocess] returns ok
Obviously, I can't insert 'Wireless-802.11' into an integer field in
the database. Is there away of disabling this lookup so that
FreeRADIUS does not translate these values when it receives a packet,
or am I going to have to code my own reverse lookup into my accounting
module?
I also have the same problem for other fields like Acct-Termination-Cause.
Jack.
More information about the Freeradius-Users
mailing list