Using Run-time variables in SQL radreply table
Alex D.
listensammler at gmx.de
Fri Dec 22 12:02:08 CET 2017
> It's not clear what's going on.
>
> Please try v3. v2 is end of life, and I can't spend any time debugging it.
>
>
FYI
After trial and error, it works now. I first tried to put
%{request:Actual-Data-Rate-Downstream} between backticks to perform a
run-time expansion, but that still doesn't worked.
mysql> select * from radreply;
+----+-------------------------+--------------------------+----+--------------------------------------------+
| id | username | attribute | op |
value |
+----+-------------------------+--------------------------+----+--------------------------------------------+
| 1 | HSI/DEU.MYID.47110815 | ERX-CoS-Shaping-Pmt-Type | == | T02
`%{request:Actual-Data-Rate-Downstream}` |
| 2 | HSI/DEU.MYID.47110815 | ERX-Virtual-Router-Name | == |
VRF_HSI_CGN |
+----+-------------------------+--------------------------+----+--------------------------------------------+
Fri Dec 22 03:44:44 2017
Packet-Type = Access-Accept
ERX-Virtual-Router-Name := "VRF-132"
ERX-CoS-Shaping-Pmt-Type := "T02
`%{Actual-Data-Rate-Downstream}`"
Later I put backticks around the *whole* string, and that finally leads
me to the goal...
mysql> select * from radreply;
+----+-------------------------+--------------------------+----+--------------------------------------------+
| id | username | attribute | op |
value |
+----+-------------------------+--------------------------+----+--------------------------------------------+
| 1 | HSI/DEU.MYID.47110815 | ERX-CoS-Shaping-Pmt-Type | == |
`T02 %{request:Actual-Data-Rate-Downstream}` |
| 2 | HSI/DEU.MYID.47110815 | ERX-Virtual-Router-Name | == |
VRF_HSI_CGN |
+----+-------------------------+--------------------------+----+--------------------------------------------+
Fri Dec 22 11:38:44 2017
Packet-Type = Access-Accept
ERX-Virtual-Router-Name := "VRF-132"
ERX-CoS-Shaping-Pmt-Type := "T02 25693"
Regards,
Alex
More information about the Freeradius-Users
mailing list