Log a Vendor-Specific Value

Jeroen Vanderauwera bcrouterproject at gmail.com
Fri May 15 14:06:29 CEST 2009

I have some problems with radius. I want to log the Value (an integer)
in my Vendor-Specific attribute to a mysql database.
I use %'{Vendor-Specific}' as variable to write it to the database but
it always writes 0x25ce0000010630390000 to the database instead of the

At the system where you have to authenticate I put the following
variables into the radiuspacket:
Vendor-Id = 9678 --> is registered at
Vendor-Length = 6
Vendor-Value = 12345

When I use radsniff at the radius server, I can see:
Packet number 1 has just been sniffed
        Type:    Accounting-Request
        Acct-Status-Type = Interim-Update
        NAS-Port = 167772161
        Service-Type = Framed-User
        Framed-IP-Address =
        Acct-Input-Octets = 4249838
        Acct-Output-Octets = 4056840
        Acct-Input-Packets = 5326
        Acct-Output-Packets = 2655
        NAS-Identifier = "bcrouter"
        Acct-Session-Id = "167772161"
        User-Name = "stage/stage"
------>Vendor-Specific = 0x25ce0000010630390000<------
Packet number 2 has just been sniffed
        Type:    Accounting-Response

If you disassamble 0x25ce0000010630390000:
(25ce)16 -> (9678)10
(00 0001)16 -> (1)10
(06)16 -> (6)10
30390000 -> (0000 3039)16 -> (12345)10

So this seems to be right. Somewhere it's logic that if you use
%'{Vendor-Specific}' as variable in the query, that you will store
0x25ce0000010630390000. But how am I able to store 12345 into the
database? I also tried to use %'{KULeuven-Test}' and just %'{Test}',
but those variables are just empty...

This is my dictionary:
VENDOR               KULeuven                         9678
ATTRIBUTE           KULeuven-Test                   1               integer
VALUE                 KULeuven-Test                   Test            12345
END-VENDOR      KULeuven

Thank you in advance,
Jeroen Vanderauwera
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20090515/3adbb958/attachment.html>

More information about the Freeradius-Users mailing list