Use expr for reply from sql database
Arran Cudbard-Bell
a.cudbardb at freeradius.org
Tue Feb 26 04:21:00 CET 2019
> On Feb 23, 2019, at 12:57 AM, kai.zemke at hauni.com wrote:
>
> Hi,
>
> I do have freeradius setup with a sql configuration. My mysql server is running the scheme that is proposed on the freeradius wiki.
>
> So far everything is doing fine. Now I want to replay with an Egress-VLANID.
>
> If I enter the value hexencoded everything works fine.
>
> But if I enter the value with the expr function the replied value is always zero and I have the following entry in my radius.log
>
> sql: Error parsing value: Unknown or invalid value "%{expr: 0x31000000 + 105}" for attribute Egress-VLANID)
>
> Do I have to mask certain characters in order to make this work?
>
> Example:
> Egress-VLANID = `%{expr: 0x31000000 + 105}`
According to the code, if you have a back quoted string in the value it will be expanded. Maybe the backquotes are being stripped somewhere?
-Arran
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20190226/13eacfd4/attachment-0001.sig>
More information about the Freeradius-Users
mailing list