Grouping of sub attributes in seperate VSAs

Бенджамин Томпсон b.thompson at
Fri Apr 13 10:55:19 CEST 2018

> With the current code you'll get alike SubTLVs occurring consecutively
> in the packed VSA/TLV attribute so you'd end up with one of those two
> variations.
> The reason why this happens is the encoder performs a merge sort on the
> attribute
> list prior to attempting to encode the attributes.  This makes efficient
> packing
> of SubTLV attributes into VSAs/TLVs much easier, because you can just look
> at the
> next attribute to see if it's in the same parent TLV, or see if there's a
> common
> nesting level.
> Because merge sort is a stable sort, you should find the ordering of
> attributes
> of the same number and lineage don't change.

Arran many thanks for your explanation.

More information about the Freeradius-Users mailing list