Hello Michael,

Friday, April 9, 2004, 11:11:43 PM, you wrote:

>> rlm_ldap: Adding radiusTrafficLimit as Rad-Traffic-Limit, value 314572800 & op=11
>>
>> radius_xlat:  '-192684935'
>>
>>         Traffic-Limit := 0
>>         Rad-Traffic-Limit = 314572800
>>
>>   I don't understand it... Rad-Traffic-Limit have value but that value
>>   don't make sense for %{expr} block. Why?

MG> I'm going to step out on a limb here and assume that you have defined
MG> Traffic-Limit and Rad-Traffic-Limit in a custom dictionary.

    Yes, that's right.

MG> I'm not
MG> personally familiar with these attributes and cannot find them in the
MG> dictionaries that come with the server.  I'm going to assume you've
MG> defined them as integers.

    Yes.

MG> According to RFC2865, integers are 32 bit
MG> *unsigned* values, so a negative number won't come across.  I haven't
MG> looked at the source to confirm this, but my guess is it's just
MG> converting the negative value to 0.

    Well, that's okay, let them convert to anything, but why
    _positive_ value of Rad-Traffic-Limit not appearing in
    %{expr:...}? Look:

rlm_ldap: Adding radiusTrafficLimit as Rad-Traffic-Limit, value 314572800 & op=11

    The positive value.

radius_xlat: Running registered xlat function of module expr for string ' 
%{Rad-Traffic-limit} -
%{sql:SELECT sum(AcctInputOctets)+sum(AcctOutputOctets)
FROM radacct WHERE UserName = '%u' AND Month(AcctStopTime)=Month(NOW()) AND 
Year(AcctStopTime) = Year(NOW())}'
radius_xlat: Running registered xlat function of module sql for string 'SELECT 
sum(AcctInputOctets)+
sum(AcctOutputOctets) FROM radacct WHERE UserName = '%u' AND Month(AcctStopTime) 
=Month(NOW()) AND
Year(AcctStopTime) = Year(NOW())'    

    Here from the positive value of Rad-Traffic-Limit must be substracted sql query 
result.
    So:

rlm_sql (sql): - sql_xlat finished
rlm_sql (sql): Released sql socket id: 3
radius_xlat:  '  - 192684935'    

    "192684935" is a sql query result. But before minus there
    must be Rad-Traffic-Limit, am i right? Where is it go to?


-- 
Best regards,
 Alexander                            mailto:[EMAIL PROTECTED]


- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to