Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

rlm_expr(5) [debian man page]

rlm_expr(5)							 FreeRADIUS Module						       rlm_expr(5)

NAME
rlm_expr - FreeRADIUS Module DESCRIPTION
The rlm_expr module allows the server to perform limited mathematical calculations. This module is not called directly in any section, it is invoked through the dynamic expansion of strings. For example, some NAS boxes send a NAS-Port attribute which is a 32-bit number composed of port, card, and interface, all in different bytes. To see these attributes split into pieces, you can have an entry in the 'users' file like: DEFAULT Vendor-Interface = `%{expr: %{NAS-Port} / (256 * 256)}`, Vendor-Card = `%{expr: (%{NAS-Port} / 256) %% 256}`, Vendor-Port = `%{expr: %{NAS-Port} %% 256}` where the attributes Vendor-Interface, Vendor-Card, and Vendor-Port are attributes created by either you or a vendor-supplied dictionary. The methematical operators supported by the expression module are: + addition - subtraction / division %% modulo remainder * multiplication & boolean AND | boolean OR () grouping of sub-expressions NOTE: The modulo remainder operator is '%%', and not '%'. This is due to the '%' character being used as a special character for dynamic translation. NOTE: These operators do NOT have precedence. The parsing of the input string, and the calculation of the answer, is done strictly left to right. If you wish to order the expressions, you MUST group them into sub-expression, as shown in the previous example. All of the calculations are performed as unsigned 32-bit integers. CONFIGURATION
modules { ... expr { } ... } ... instantiate { ... expr ... } SECTIONS
instantiate FILES
/etc/raddb/radiusd.conf SEE ALSO
radiusd(8), radiusd.conf(5) AUTHOR
Chris Parker, cparker@segv.org 5 February 2004 rlm_expr(5)

Check Out this Related Man Page

rlm_acct_unique(5)						 FreeRADIUS Module						rlm_acct_unique(5)

NAME
rlm_acct_unique - FreeRADIUS Module DESCRIPTION
The rlm_acct_unique module creates a unique accounting session Id. Many NAS vendors have their equipment supply an Acct-Session-Id attribute which is not unique over reboots. This makes accounting diffi- cult, as there will be many independent sessions with the same Acct-Session-Id attribute. This module uses the Acct-Session-Id attribute, along with other attributes in the request, to create a more unique session ID, called Acct-Unique-Session-Id. The main configuration items to be aware of are: key A list of the attributes used in calculating an MD5 hash which is used as the value for the unique session id. CONFIGURATION
modules { ... acct_unique { key = "User-Name, Acct-Session-Id, NAS-IP-Address, NAS-Port" } ... } ... preacct { ... acct_unique ... } After generating the MD5 hash, the module adds it to the accounting request packet received from the client. It will look something like this in your detail file: Acct-Unique-Session-Id = "c66ef57e480b9d26" NOTE: Any attribute you specify that is not found in the 'dictionary' file will cause the server to fail and exit with an error. NOTE: If you want the Acct-Unique-Session-Id of the Start and the Stop packet of a particular session to match, you must use values for the key that will stay the same for the Start and Stop. The above example is a good start. Adding 'Acct-Session-Time', for example, would cause a mismatch because that value is not the same on the Start and Stop accounting packets. SECTIONS
authorization, pre-accounting, accounting FILES
/etc/raddb/radiusd.conf SEE ALSO
radiusd(8), radiusd.conf(5) AUTHORS
Chris Parker, cparker@segv.org 3 February 2004 rlm_acct_unique(5)
Man Page