Hello-

We are using freeradius-0.4, and noticed a couple log entries for 
'zero session length'. I tracked it down to the block (below) in 
rlm_sql.c.

Now, we only got a couple log entries, but in both cases we had 
"open" sessions in the database that were not closed due to a 
0-length session time (so we are treating them as "valid".)

My question is basically: The comment here notes that you only want 
to return RLM_MODULE_FAIL if the session length is 0 AND no previous 
session was found. Does this actually check for previous sessions? A 
cursory glance did not reveal where it was checking this.

-Kevin

#ifdef CISCO_ACCOUNTING_HACK
        /*
         * If stop but zero session length AND no previous
         * session found, drop it as in invalid packet
         * This is to fix CISCO's aaa from filling our
         * table with bogus crap
         */
        if ((pair = pairfind(request->packet->vps, 
PW_ACCT_SESSION_TIME)) != NULL)
                acctsessiontime = pair->lvalue;

        if ((acctsessiontime <= 0) && (acctstatustype == 
PW_STATUS_STOP)) {
                radius_xlat(logstr, MAX_QUERY_LEN, "rlm_sql:  Stop 
packet with zero session length.  (user '
%{User-Name}', nas '%{NAS-IP-Address}')", request, NULL);
                radlog(L_ERR, logstr);
                sql_release_socket(inst, sqlsocket);
                return RLM_MODULE_FAIL;
        }
#endif


---------------------------------------------------
Kevin C. Miller <[EMAIL PROTECTED]>
Network Group
Carnegie Mellon University

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

Reply via email to