Run time variable in sql

rob-ml at mailbox.org rob-ml at mailbox.org
Mon Mar 26 14:05:11 CEST 2018


Hi,

now tested, no matter which operator, always with the same result.

Receive:
(3)   Actual-Data-Rate-Upstream = 41999
(3)   Actual-Data-Rate-Downstream = 109066

Processing in radiusd -X debug:
(3) sql: EXPAND `%{request:Actual-Data-Rate-Upstream}00`
(3) sql:    --> `4199900`
(3) sql: EXPAND `%{request:Actual-Data-Rate-Downstream}00`
(3) sql:    --> `10906600`

Result/response:
(3)   Huawei-Input-Average-Rate = 0
(3)   Huawei-Output-Average-Rate = 0

Best wishes
Rob


Alan DeKok <aland at deployingradius.com> hat am 26. März 2018 um 13:30 geschrieben: On Mar 26, 2018, at 4:32 AM, rob-ml at mailbox.org wrote: after problems in an older version I changed to the newest one (3.0.16). Now the attributes are processed but not delivered correctly. I want to process %{Actual…


> Alan DeKok <aland at deployingradius.com> hat am 26. März 2018 um 13:30 geschrieben:
> 
> 
> On Mar 26, 2018, at 4:32 AM, rob-ml at mailbox.org wrote:
> > after problems in an older version I changed to the newest one (3.0.16).
> > Now the attributes are processed but not delivered correctly.
> > 
> > I want to process %{Actual-Data-Rate-Downstream} and set it as attribute Huawei-Output-Average-Rate.
> 
>   OK...
> 
> > 
> > +-----------+----------------------------+----+------------------------------------------+
> > | groupname | attribute | op | value |
> > +-----------+----------------------------+----+------------------------------------------+
> > | 50m | Huawei-Input-Average-Rate | = | `%{request:Actual-Data-Rate-Upstream}00` |
> > | 50m | Huawei-Output-Average-Rate | = | `%{request:Actual-Data-Rate-Downstream}00` |
> > +-----------+----------------------------+----+------------------------------------------+
> 
>   Which sets Huawei-Input-Average-Rate, but only if it isn't already set.  If you want to force it to that value, use ":=".
> 
>   See the rlm_sql documentation for more details on the difference between "=" and ":=".
> 
>   Alan DeKok.
> 
> 
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html



More information about the Freeradius-Users mailing list