Updates to "unlang"

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

> On 11 Dec 2015, at 09:21, Alan DeKok <aland at deployingradius.com> wrote:
> On Dec 11, 2015, at 9:17 AM, Arran Cudbard-Bell <a.cudbardb at freeradius.org> wrote:
>> policy ipaddr resolve_fqdn (string hostname)
>> {
>> 	return <ipaddr>"%{a:&hostname}"
>> }
>  Can I gouge out my eyes now?

Go ahead :)

>  I'm wary of adding things like that to the server.  It might be useful, but it has a high potential for abuse and/or confusion.

People abuse policies now, using Tmp attributes as arguments and to hold return values has a far greater potential for confusion.

By refusing to add proper functions, we're increasing real world abuse and confusion.

Are you going to argue perl subroutines are more readable than C functions?  I doubt anyone except Larry Wall's most devout followers would agree with you.

>> update request {
>> 	&Tmp-ipaddr-0 := resolve_fqdn("google.com")
> As opposed to:
> 	&Tmp-ipaddr-0 := "google.com"
>  Which works today?

It has the potential to be dynamic, which doesn't work today, or at least I hope not.

The unbound module would be a great test for converting to async as it has very little state,  and the API in its normal form is asynchronous.


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/bce31869/attachment.sig>

More information about the Freeradius-Devel mailing list