Hi<br><br>I am having an issue, which may be the way I changed the dialup.conf or maybe its my logic. This is what I have done & am trying to achieve.<br><br>freeradius is used to authenticate users at our hotspots, as we are using different nas devices and we must cater for them all i did this.<br>
<br>in dictionary file I added an attribute called databank, then I created a perl script to check which type of nas the user is coming from and renaming databank to the correct attribute, now that works fine. Then on the stop request I need to update the value associated to databank to be (databank - (acctinputoctets+acctoutputoctets)). that way limiting users to only as much "data" as we stipulated in the begining. my problem is that it doesn't always update the databank value, I can see how much traffic a users used in his session (i.e. in the radacct table) so the accounting_stop_query & accounting_stop_query_alt are not failing, its just not updating the databank value in radcheck.<br>
<br>here are the two queries<br><br> accounting_stop_query = " \<br> UPDATE radacct,radcheck SET \<br> radacct.acctstoptime = '%S', \<br> radacct.acctsessiontime = '%{Acct-Session-Time}', \<br>
radacct.acctinputoctets = '%{%{Acct-Input-Gigawords}:-0}' << 32 | \<br> '%{%{Acct-Input-Octets}:-0}', \<br> radacct.acctoutputoctets = '%{%{Acct-Output-Gigawords}:-0}' << 32 | \<br>
'%{%{Acct-Output-Octets}:-0}', \<br> radacct.acctterminatecause = '%{Acct-Terminate-Cause}', \<br> radcheck.value = radcheck.value - '%{Acct-Output-Octets}' - '%{Acct-Input-Octets}', \<br>
radacct.acctstopdelay = '%{%{Acct-Delay-Time}:-0}', \<br> radacct.connectinfo_stop = '%{Connect-Info}' \<br> WHERE radacct.acctsessionid = '%{Acct-Session-Id}' \<br>
AND radcheck.username = '%{SQL-User-Name}' \<br> AND radcheck.attribute = 'databank' \<br> AND radacct.username = '%{SQL-User-Name}' \<br> AND radacct.nasipaddress = '%{NAS-IP-Address}'"<br>
<br><br><br> accounting_stop_query_alt = " \<br> UPDATE radacct,radcheck SET \<br> radacct.acctstoptime = '%S', \<br> radacct.acctsessiontime = '%{Acct-Session-Time}', \<br>
radacct.acctinputoctets = '%{%{Acct-Input-Gigawords}:-0}' << 32 | \<br> '%{%{Acct-Input-Octets}:-0}', \<br> radacct.acctoutputoctets = '%{%{Acct-Output-Gigawords}:-0}' << 32 | \<br>
'%{%{Acct-Output-Octets}:-0}', \<br> radacct.acctterminatecause = '%{Acct-Terminate-Cause}', \<br> radacct.acctstopdelay = '%{%{Acct-Delay-Time}:-0}', \<br>
radacct.connectinfo_stop = '%{Connect-Info}', \<br> radcheck.value = radcheck.value - '%{Acct-Output-Octets}' - '%{Acct-Input-Octets}' \<br> WHERE radacct.acctsessionid = '%{Acct-Session-Id}' \<br>
AND radacct.username = '%{SQL-User-Name}' \<br> AND radacct.nasipaddress = '%{NAS-IP-Address}' \<br> AND radcheck.username = '%{SQL-User-Name}' \<br>
AND radcheck.attribute = 'databank'"<br><br><br>does anyone know how this can happen? could it be something to do with interim-updates (grasping at straws here).<br><br>any help would be great.<br><br>
Thanks<br>