Linelog fails when attribute does not exist
Alan DeKok
aland at deployingradius.com
Mon Jul 29 20:28:28 CEST 2019
On Jul 29, 2019, at 2:17 PM, R3DNano <r3dnano at gmail.com> wrote:
>
> I'm tryin to implement linelog so I can send information to a remote syslog
> server.
> It seems to work perfectly unless I try to send an attribute that is not
> defined or used at the time.
> For this reason, the linelog module fails to send any data.
> Is there any way to make it default to something else like an empty value
> so it does not crash instead?
It shouldn't *crash*. It should just fail.
See "man unlang". You can use optional expansions:
%{%{User-Name}:-?}
Will expand to %{User-Name} if it exists, otherwise to "?"
Alan DeKok.
More information about the Freeradius-Users
mailing list