2GB problems

Tas Dionisakos tas at newman.unimelb.edu.au
Thu Jan 25 00:18:00 CET 2007


I have setup a captive portal with mysql,chilli, and freeradius.

My portal allows users access base on data use (quota), I am using the 
rlm_sqlcounter (from freeradius 1.1.4) to measure the usage on login.

The problem Im having is that if I assign a quota more than 2gb 
freeradius sees the bytes in a negative value for some reason, I have 
attached rad logs.

This is the line I dont understand (rlm_sqlcounter: Rejected user will, 
check_item=-1149239296, counter=0). Yet in mysql its fine!

Any help with this will be greatly appreciated!


rad_recv: Access-Request packet from host 127.0.0.1:32772, id=0, length=195
User-Name = "will"
User-Password = "pass"
NAS-IP-Address = 0.0.0.0
Service-Type = Login-User
Framed-IP-Address = 192.168.182.3
Calling-Station-Id = "00-16-CB-BE-3A-41"
Called-Station-Id = "00-14-5E-18-83-D9"
NAS-Identifier = "nas01"
Acct-Session-Id = "45b7e66b00000001"
NAS-Port-Type = Wireless-802.11
NAS-Port = 1
Message-Authenticator = 0x0444eede46ea26a2629277905eb408f7
WISPr-Logoff-URL = "http://192.168.182.1:3990/logoff"
Processing the authorize section of radiusd.conf
modcall: entering group authorize for request 0
modcall[authorize]: module "preprocess" returns ok for request 0
modcall[authorize]: module "chap" returns noop for request 0
modcall[authorize]: module "mschap" returns noop for request 0
rlm_realm: No '@' in User-Name = "will", looking up realm NULL
rlm_realm: No such realm "NULL"
modcall[authorize]: module "suffix" returns noop for request 0
radius_xlat: 'will'
rlm_sql (sql): sql_set_user escaped user --> 'will'
radius_xlat: 'SELECT id, UserName, Attribute, Value, op FROM radcheck 
WHERE Username = 'will' ORDER BY id'
rlm_sql (sql): Reserving sql socket id: 4
radius_xlat: 'SELECT 
radgroupcheck.id,radgroupcheck.GroupName,radgroupcheck.Attribute,radgroupcheck.Value,radgroupcheck.op 
FROM radgroupcheck,usergroup WHERE usergroup.Username = 'will' AND 
usergroup.GroupName = radgroupcheck.GroupName ORDER BY radgroupcheck.id'
radius_xlat: 'SELECT id, UserName, Attribute, Value, op FROM radreply 
WHERE Username = 'will' ORDER BY id'
radius_xlat: 'SELECT 
radgroupreply.id,radgroupreply.GroupName,radgroupreply.Attribute,radgroupreply.Value,radgroupreply.op 
FROM radgroupreply,usergroup WHERE usergroup.Username = 'will' AND 
usergroup.GroupName = radgroupreply.GroupName ORDER BY radgroupreply.id'
rlm_sql (sql): Released sql socket id: 4
modcall[authorize]: module "sql" returns ok for request 0
rlm_sqlcounter: Entering module authorize code
rlm_sqlcounter: Could not find Check item value pair
modcall[authorize]: module "noresetcounter" returns noop for request 0
rlm_sqlcounter: Entering module authorize code
sqlcounter_expand: 'SELECT SUM(AcctOutputOctets) FROM radacct where 
UserName='%{User-Name}''
radius_xlat: 'SELECT SUM(AcctOutputOctets) FROM radacct where 
UserName='will''
sqlcounter_expand: '%{sql:SELECT SUM(AcctOutputOctets) FROM radacct 
where UserName='will'}'
radius_xlat: Running registered xlat function of module sql for string 
'SELECT SUM(AcctOutputOctets) FROM radacct where UserName='will''
rlm_sql (sql): - sql_xlat
radius_xlat: 'will'
rlm_sql (sql): sql_set_user escaped user --> 'will'
radius_xlat: 'SELECT SUM(AcctOutputOctets) FROM radacct where 
UserName='will''
rlm_sql (sql): Reserving sql socket id: 3
rlm_sql (sql): row[0] returned NULL
rlm_sql (sql): Released sql socket id: 3
radius_xlat: ''
rlm_sqlcounter: (Check item - counter) is less than zero
rlm_sqlcounter: Rejected user will, check_item=-1149239296, counter=0
modcall[authorize]: module "mb" returns reject for request 0
modcall: leaving group authorize (returns reject) for request 0

-- 
*************************************
Tas Dionisakos
IT Manager
St Mary’s College and Newman College
The University of Melbourne
T: 03 9342 1708
M: 0439 655 565
E: tas at newman.unimelb.edu.au
C: (0o (||||)(||||) o0)
*************************************




More information about the Freeradius-Users mailing list