+Hi ,<br><br> I am using freeradius 2.1.6 + mysql + LDAP for AAA in freebsd server. What I want to do is, when my AP reboots or due to power failure clients login is still seen there as online but the client is not able to do login. SO is it possible to clear the stale session with unlang if the authentication request come from same calling station id? I tried to do in /etc/freeradius/sites-enable/default  authorize section<br>
<br>if(User-Name){<br>"%{sql: UPDATE radacct set AcctStopTime=ADDDATE(AcctStartTime,INTERVAL AcctSessionTime SECOND), AcctTerminateCause='Clear-Stale Session' WHERE UserName='%{User-Name}' and CallingStationId='%{Calling-Station-Id}' and AcctStopTime is null}"<br>
}<br><br>but it doesn't help me, giving me error like<br>Wed Jan 12 15:16:14 2011 : Error: rlm_sql_mysql: MYSQL Error: No Fields<br>Wed Jan 12 15:16:14 2011 : Error: rlm_sql_mysql: MYSQL error: <br>
Wed Jan 12 15:16:14 2011 : Info: rlm_sql_mysql: Starting connect to MySQL server for #4<br>Wed Jan 12 15:16:14 2011 : Error: rlm_sql (sql): failed after re-connect<br><br>any help?<br>thank you<br><br><div style="visibility: hidden; display: inline;" id="avg_ls_inline_popup">
</div><style type="text/css">#avg_ls_inline_popup {  position:absolute;  z-index:9999;  padding: 0px 0px;  margin-left: 0px;  margin-top: 0px;  width: 240px;  overflow: hidden;  word-wrap: break-word;  color: black;  font-size: 10px;  text-align: left;  line-height: 13px;}</style>