Values

The value field contains data as given in Data Types. The format of the value is attribute-specific and is usually a string, integer, IP address, or other.

Prior to the attribute being instantiated, the value may be expanded as described in section Data Types. The expansion of the value allows for greater flexibility; for example, an IP address value can be assigned to an attribute by specifying the IP address directly, by having the address returned from a database query, or by having the address returned as the output of an executed program.

When string values are assigned to an attribute, they can have a maximum length of 253 characters. Any extra data is silently discarded, causing the string to be truncated.

This truncating behavior is due to limitations of the RADIUS protocol, which can only transport strings of 253 characters or less; thus, attributes can only contain strings of that length. The Unlang parser has no such limit, however, so strings within the configuration files can have nearly arbitrary length. For example, it is possible to write an SQL SELECT statement that is more than 1000 characters long. The result of the SELECT statement will, however, be truncated to 253 characters.

Examples:

0
192.0.2.16
'foo bar'
"hello"
"%{sql: SELECT …​ }"