Hi Arran,
I think i have managed to make the datacounter working. It may not be
the best counter but it is the best i have ever done in freeradius.
Below posted is the configs :
Post-Auth {
sql
# Unlang Data-Counter. Sends Mikrotik-Recv-Limit to NAS
update control {
On 8 Aug 2011, at 16:29, Suman Dash wrote:
> Just another small question before i jump into testing. If output from
> sub-query is less than 32bit, I can easily store it in Tmp-Integer ,
> But sometimes when the user data usage is null, the sub-query will
> output more than 32bit ex. 10GB Limit B
Just another small question before i jump into testing. If output from
sub-query is less than 32bit, I can easily store it in Tmp-Integer ,
But sometimes when the user data usage is null, the sub-query will
output more than 32bit ex. 10GB Limit But user downloaded 0 Bytes.
In that condition it is
On 8 Aug 2011, at 16:11, Suman Dash wrote:
> So what you say is that i do all comparision within sql sub-query and
> whatever output i need to define if less than 32bit store it into an
> Integer and do Unlang control / reply updates ?
>
> Seems quite right .. Will try and get back with results.
So what you say is that i do all comparision within sql sub-query and
whatever output i need to define if less than 32bit store it into an
Integer and do Unlang control / reply updates ?
Seems quite right .. Will try and get back with results.
Thanks for the tip..
Regards
Suman
On Mon, Aug 8, 2
> Unfortunately I am not much of a programmer .
Ok... but you know SQL right? Which is why i'm suggesting to do the comparison
in the SQL database.
> Therefore if you can put
> some examples / pointers based on my requirement, it will be a
> headstart for me .
http://dev.mysql.com/doc/refman/5
On 8 Aug 2011, at 11:32, Arran Cudbard-Bell wrote:
>
> On 8 Aug 2011, at 11:09, Suman Dash wrote:
>
>> What i mean to say is that i am not using an integer to store the
>> value as integer is limited to 32bit, Instead i am directly comparing
>> output from sql query in Unlanf but it doesn't see
Hi Arran,
Unfortunately I am not much of a programmer . Therefore if you can put
some examples / pointers based on my requirement, it will be a
headstart for me . I had also read somewhere that if we can strip the
last 3 octet then atleast 4TB of traffic can be managed in replying
back .
However,
Undermentioned is the complete config. This is a direct approach
without storing the results in Tmp-Integer . I assume that this direct
approach has nothing to do with 32bit length of Freeradius Attributes.
What i am looking to accomplish is a data counter which does not wraps
at 4GB, Checks wheth
On 8 Aug 2011, at 11:09, Suman Dash wrote:
> What i mean to say is that i am not using an integer to store the
> value as integer is limited to 32bit, Instead i am directly comparing
> output from sql query in Unlanf but it doesn't seems to work either.
Then no. AFAIK FreeRADIUS doesn't support
What i mean to say is that i am not using an integer to store the
value as integer is limited to 32bit, Instead i am directly comparing
output from sql query in Unlanf but it doesn't seems to work either.
It returns false where it should be returning true.
Regards
On Mon, Aug 8, 2011 at 2:27 PM,
On 8 Aug 2011, at 09:32, Suman Dash wrote:
> So it is not possible to store values more than 32 bit in Tmp-Integer.
> How about direct sql statements in Unlang not involving the
> Tmp-Integer. It is also not working in my scenario.
>
You mean a comparison of two integers from two SQL statements
So it is not possible to store values more than 32 bit in Tmp-Integer.
How about direct sql statements in Unlang not involving the
Tmp-Integer. It is also not working in my scenario.
Attached is the logs.
Going to the next request
Ready to process requests.
rad_recv: Access-Request packet from h
RFC 2865:
integer 32 bit unsigned value, most significant octet first.
FreeRADIUS is just a RADIUS server, and the temporary integer attributes are
just RADIUS attributes.
-Arran
On 8 Aug 2011, at 09:11, Suman Dash wrote:
> I am trying to replace sqlcounter with Unland expression in
I am trying to replace sqlcounter with Unland expression in Post Auth
Section. The values are successfully called but while storing in
Tmp-Interger those are stripped. Below are the logs .
As you can see from the logs that Mysql returns a value of 20989570594
But it's stored as 3557549056 for Tmp-I
15 matches
Mail list logo