Control sub-TLV attributes order in rest module

Avner Elizarov avnerelizarov at gmail.com
Sun Sep 10 10:21:54 CEST 2017


Hi,
I'm using the freeradius rest module to convert form json to radius format.
I have a TLV attribute with several sub-attributes and I want to control
the order that the rest module puts the sub attributes.
For example, lets say I have an example TLV (tlv_example) with 2 sub
attributes, a string (*sub1*) and an integer (*sub2*).
I want to create 2 instances of the *tlv_example*, each with its own 2 sub
attributes. How should I send the information to the rest module in a way
that it would generate 2 seperate AVPs (one for each tlv) and how can I
control the order of the sub-attributes inside each AVP?

The format I used so far was sending an array for each sub attribute and
this created a single AVP that contained all of the sub attributes in the
follwoing order:
<sub1_instance1><sub1_instance2><sub2_instance1><sub2_instance2>
Meaning all instances of the same sub attribute were grouped together and i
would like the format to be:
<sub1_instance1<sub2_instance1>><sub1_instance2><sub2_instance2>
Meaning all sub attributes of the same instance to be grouped (in a
seperate TLV).

What is the json format I need to use for that to happen?

Thanks,
Avner


More information about the Freeradius-Users mailing list