Use expr for reply from sql database
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}` Best regards Kai ________________________________ Diese E-Mail kann vertrauliche Informationen enthalten. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Informationen sind nicht gestattet. Sollten Sie diese E-Mail irrt?mlich erhalten haben, informieren Sie bitte den Absender und l?schen diese E-Mail. This e-mail may contain confidential information, which should not be copied or distributed without authorization. If you have received this e-mail message by mistake, please inform the sender and delete it from your system.
On Feb 23, 2019, at 12:57 AM, kai.zemke@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
participants (2)
-
Arran Cudbard-Bell -
kai.zemke@hauni.com