attribute overflow from sql query in unlang

Alan DeKok aland at deployingradius.com
Wed Dec 21 02:32:54 CET 2016


On Dec 20, 2016, at 7:32 PM, firing neurons <firingneurons at mail.com> wrote:
>   Why is their an overflow in the first case? I am using radius3

  Because Tmp-Integer is a 32-bit integer.

>   The same query is used by the relevant sqlcounter module and it works
>   as expected and doesn't overflow.
> 
>   I am trying to send CoA disconnect to the NAS after the user exhuasts
>   their data with sql and unlang logic in accounting section.
> 
>   I also tried simply using the reply attribute Mikrotik-Total-Limit but
>   the the NAS also expected Mikrotik-Total-Limit-Gigawords.
> 
>   The sqlcounter I made simply sent overflown value in
>   Mikrotik-Total-Limit and hence lmit of more than 4Gb couldn't be
>   enforced.

  Use a 64-bit attribute.  e.g. Tmp-Integer64

>   Any way I can send the extra reply attribute from the sqlcounter?

  You will need to manually split Tmp-Integer64 into two different 32-bit attributes.

  Alan DeKok.




More information about the Freeradius-Users mailing list