Updates to "unlang"

Arran Cudbard-Bell a.cudbardb at freeradius.org
Fri Dec 11 15:17:47 CET 2015


> On 11 Dec 2015, at 09:08, Alan DeKok <aland at deployingradius.com> wrote:
> 
> On Dec 11, 2015, at 8:57 AM, Phil Mayers <p.mayers at imperial.ac.uk> wrote:
>> 
>> On 11/12/15 13:55, Alan DeKok wrote:
>> 
>>>  Ideas?  Comments?
>> 
>> The module/argument thing is a nice idea, particularly if it is possible to soft-define them in policy.d
> 
>  Examples?  Use-cases?
> 
>  Passing arguments to *existing* module functions is not possible.  But it's possible to define new keywords which map to new module functions.
> 
> Alan DeKok.
> 
> 
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html

policy ipaddr resolve_fqdn (string hostname)
{
	return <ipaddr>"%{a:&hostname}"
}

update request {
	&Tmp-ipaddr-0 := resolve_fqdn("google.com")
}

TMPL_TYPE_FUNCTION :)

Same TMPL type could be used for module functions and policy defined functions.

-Arran

Arran Cudbard-Bell <a.cudbardb at freeradius.org>
FreeRADIUS development team

FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 872 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freeradius.org/pipermail/freeradius-devel/attachments/20151211/cc6d2d05/attachment.sig>


More information about the Freeradius-Devel mailing list