Changing Class attribute from octets to string
Hello, I need to use the class attribute in order to assign the user to a service plan in a DPI box. The Class attribute is been carried in the acct packets, the problem is that Freeradius is converting it to hexadecimal, I've changed the type from octets to string and restarted the service but it continued to be converted to hex. What can I do to get this attribute to be carried in plain text format? Thanks. --
Antonio Modesto Amaral Sousa wrote:
I need to use the class attribute in order to assign the user to a service plan in a DPI box. The Class attribute is been carried in the acct packets, the problem is that Freeradius is converting it to hexadecimal, I've changed the type from octets to string and restarted the service but it continued to be converted to hex. What can I do to get this attribute to be carried in plain text format?
Use: %{string:Class} It will print out the Class as if it was of type "string". In general, it's a bad idea to edit the dictionaries. Alan DeKok.
On Mon 31 Mar 2014 12:42:37 PM BRT, Alan DeKok wrote:
Antonio Modesto Amaral Sousa wrote:
I need to use the class attribute in order to assign the user to a service plan in a DPI box. The Class attribute is been carried in the acct packets, the problem is that Freeradius is converting it to hexadecimal, I've changed the type from octets to string and restarted the service but it continued to be converted to hex. What can I do to get this attribute to be carried in plain text format?
Use: %{string:Class}
It will print out the Class as if it was of type "string".
In general, it's a bad idea to edit the dictionaries.
Alan DeKok.
Hello Allan, Thank you for replying. Sorry for the stupid question but, where am I supposed to put this config? I don't know if I was clear enough in the last e-mail, I need the attribute in plain text format inside the acct packet so my DPI box can get the service plan of the user, not to just convert it. Thanks a lot.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
-- Atenciosamente, Antonio Modesto Amaral Sousa Gerente de rede Praça Getúlio Vargas, 77 - Sala 308 - Centro Santo Antônio do Monte/MG - 35.560-000 (37) 3281-2800 (ramal: 110) / 0800-300-2800 / *37.9814-8465* *modesto@isimples.com.br* / faleconosco@isimples.com.br http://www.isimples.com.br
Antonio Modesto Amaral Sousa wrote:
Thank you for replying. Sorry for the stupid question but, where am I supposed to put this config? I don't know if I was clear enough in the last e-mail, I need the attribute in plain text format inside the acct packet
What does that mean? The attributes in the packet do NOT have a data type. They're just binary blobs. The RFCs say that Class is a binary blob, too.
so my DPI box can get the service plan of the user, not to just convert it.
If you're sending accounting packets to your DPI box, then you need to fix your DPI box to treat Class as text. No amount of poking FreeRADIUS will change the way your DPI box works. Perhaps you could explain what you *think* is going on. Right now, it looks like you're operating under false assumptions. Therefore, your questions are wrong. Alan DeKok.
On Mon 31 Mar 2014 02:07:05 PM BRT, Alan DeKok wrote:
Antonio Modesto Amaral Sousa wrote:
Thank you for replying. Sorry for the stupid question but, where am I supposed to put this config? I don't know if I was clear enough in the last e-mail, I need the attribute in plain text format inside the acct packet
What does that mean? The attributes in the packet do NOT have a data type. They're just binary blobs. The RFCs say that Class is a binary blob, too.
so my DPI box can get the service plan of the user, not to just convert it.
If you're sending accounting packets to your DPI box, then you need to fix your DPI box to treat Class as text. No amount of poking FreeRADIUS will change the way your DPI box works.
Perhaps you could explain what you *think* is going on. Right now, it looks like you're operating under false assumptions. Therefore, your questions are wrong.
Hello Alan, You're right. I misunderstood the concept. Freeradius can't do anything about the way the NAS/DPI read or treat the attributes. Sorry about that.
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
-- Atenciosamente, Antonio Modesto Amaral Sousa Gerente de rede Praça Getúlio Vargas, 77 - Sala 308 - Centro Santo Antônio do Monte/MG - 35.560-000 (37) 3281-2800 (ramal: 110) / 0800-300-2800 / *37.9814-8465* *modesto@isimples.com.br* / faleconosco@isimples.com.br http://www.isimples.com.br
participants (2)
-
Alan DeKok -
Antonio Modesto Amaral Sousa