<div dir="ltr"><div> </div>
<div>Well, taking this issue back to the begining - it all started with my report that using the attribute Chilli-Max-Total-Octets</div>
<div>in the sqlcounter provided as follows yields wrong results for all of the reset times (daily/weekly/monthly):</div>
<div> </div>
<div> sqlcounter counterChilliSpotMaxDailyOctets {<br> counter-name = ChilliSpot-Max-Daily-Octets<br> check-name = ChilliSpot-Max-Daily-Octets<br> reply-name = ChilliSpot-Max-Total-Octets<br>
sqlmod-inst = sql<br> key = User-Name<br> reset = daily<br> error-msg = "Sorry, your maximum traffic usage (download and upload) has exceed the provided limit"<br>
query = "SELECT (SUM(AcctInputOctets + AcctOutputOctets)) FROM radacct WHERE UserName='%{%k}' AND UNIX_TIMESTAMP(AcctStartTime) + AcctSessionTime > '%b'"<br> }</div>
<div> </div>
<div>For a user defined with the following entry in radcheck:</div>
<div>| 346 | tester1 | ChilliSpot-Max-Daily-Octets | := | 26214400 |</div>
<div> </div>
<div>The result returned by freeradius is:</div>
<div>check_item=26214400 and counter=24004370, return value=26239950 (which makes no sense).</div>
<div> </div>
<div> </div>
<div> </div>
<div>Regards,</div>
<div>Liran.</div>
<div><br> </div>
<div class="gmail_quote">2008/10/30 Venkatesh K <span dir="ltr"><<a href="mailto:kaevee@gmail.com" target="_blank">kaevee@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">The patch I posted was out of the hat just to skip the routine<br>which adds additional quota.<br><br>We have stopped using rlm_sqlcounter long back as we moved<br>
from radius schema to our own custom schema and patched<br>the rlm_sql to work with our custom schema.<br><br>If you or someone list out what one would like to see in rlm_sql_counter,<br>I will try to come up with the patch. Back porting to previous versions<br>
of radius should not be a big problem as rlm_sql and rlm_sqlcounter<br>have't changed much.<br><br>Thanks,<br><br>Venkatesh K<br><br></blockquote></div></div>