OUR SITES NetworkRADIUS FreeRADIUS

Keywords

The following tables list the keywords used in Unlang. These keywords implement the "flow control" of the policies.

Flow Control Keywords

The flow control keywords allow if / then / else checks, simple looping, etc.

Table 1. Flow Control
Keyword Description

break

Exit early from a foreach loop.

case

Match inside of a switch.

else

Do something when an if does not match.

elsif

Check for condition when a previous if does not match.

foreach

Loop over a list of attributes.

if

Check for a condition, and execute a sub-policy if it matches.

return

Immediately stop processing a section.

switch

Check for multiple values.

Attribute Editing Keywords

The attribute editing keywords allow policies to add, delete, and modify attributes in any list or packet.

Table 2. Attribute Editing
Keyword Description

update

Add or filter attributes to a list

Grouping Keywords

The grouping keywords allow policies to be organized into groups, including load-balancing.

Table 3. Grouping
Keyword Description

group

Group a series of statements.

load-balance

Define a load balancing group without fail-over.

redundant

Define a redundant group with fail-over.

redundant-load-balance

Define a redundant group with fail-over and load balancing.

Module Keywords

The module keywords refer pre-packaged libraries that implement specific functionality, such as connecting to SQL, LDAP, etc. The name used here is not the literal string module. Instead, it is the name of an instance of a pre-packaged module such as sql, or ldap, or eap.

The documentation below describes how to reference modules. That is, how to use sql, etc. in the policies. Please see raddb/mods-available/ for configuration examples for each module.

Table 4. Modules
Keyword Description

<module>

Execute a named module, e.g., sql.

<module>.<method>

Execute a particular method of a named module, e.g., pap.authorize

reject

Built-in modules, e.g., reject, or ok, etc.