possible bug in structure-type attribute assignement in freeradius-4 alpha

Alan DeKok aland at deployingradius.com
Tue Nov 11 13:29:32 UTC 2025


On Nov 11, 2025, at 3:48 AM, Stacy via Freeradius-Devel <freeradius-devel at lists.freeradius.org> wrote:
> Namely, I'm talking about this piece of config:
> 
> -----8<--------------8<-----------------------------
> send Relay-Reply {
>       #
>       #  All replies MUST include a Server-ID option
>       #
>       &reply.Server-ID.DUID += ::UUID
>       &reply.Server-ID.DUID.UUID.Value := 0x00000000000000000000000000000000
> }

The problem may be in part how you're creating the attributes.  Unlike v3, the attributes are NOT in a "flat" namespace.  You CANNOT use the v3 "update" syntax for v4.

 Specifically:

&reply.Server-ID.DUID += ::UUID

 In v4, "+=" is addition for integers, or string append for strings.  It is NOT "append new attribute to the list".

 Plus, you don't need to use "&".

 For v4, you should do:

reply += {
Server-ID = {
DUID = ::UIUD
DUID.UUID = {
Value = 0x00000000000000000000000000000000
}
}

 That being said, the server shouldn't crash.

 But again, if you're using v4, you CANNOT simply use the v3 attribute names, "update" syntax, etc.  You MUST use the v4 syntax.

 Alan DeKok.


More information about the Freeradius-Devel mailing list