reference client stanzas in unlang?

Alan DeKok aland at deployingradius.com
Tue Feb 17 11:04:38 CET 2009


Stefan Winter wrote:
> Hi,
> 
> is there a way to reference the name of the client stanza (or its
> shortname) in unlang? I.e. if there is
> 
> client foo {
>     ipaddr = 1.2.3.4
>     shortname = foostuff
> }
> 
> Then there's a request coming in from this client. In the client
> processing, can there be sth like
> 
> if ( -- something that reveals "foo" or "foostuff" -- ) {
> ...
> }
> 
> ?


	if ("%{client:shortname}" == "foostuff") {
		...
	}

  Also:

	%{home_server:foo}
	%{home_server_pool:foo}
	%{config:section.subsection.item} gets you "value" for that item

  Alan DeKok.



More information about the Freeradius-Users mailing list