FreeRADIUS Version 0.7.1, for host i686-pc-linux-gnu.
Using MySQL for authentication and accounting.

I got the counter module set up and the proper entry in the radcheck table of the 
database, and started sending accounting packets to my RADIUS server.  I noticed the 
following message from the log when I ran it with the -X option:

modcall[accounting]: module "counter" returns noop

Upon investigation, I determined that the NOOP was being returned from rlm_counter.c, 
lines 406 and 407.  Lines 402-411 are included for context:

/*
 * Check if we need to watch out for a specific service-type. If yes then check it
 */
if (data->service_type != NULL) {
           if ((proto_vp = pairfind(request->packet->vps, PW_SERVICE_TYPE)) == NULL)
                   return RLM_MODULE_NOOP;
           if (proto_vp->lvalue != data->service_val)
                   return RLM_MODULE_NOOP;
}

The second if (if proto_vp = pairfind ...) was returning true and RLM_MODULE_NOOP was 
being returned by the module.  I printed out the value of data->service_type, and it 
was 'Framed-User'.

When I commented out all of the above lines, the counter module began working and 
continues to work like a charm.  

My questions: 

1. What does the section that I commented out do?
2. Will this adversely affect anything?
3. I assume there should be a better way to make this work - can anyone tell me why it 
wouldn't work before?

Below are the relevant bits of the conf file and the row from radcheck.

Thanks!

Aaron

Row I added to radcheck in the MySQL database:

|  7 | awebb    | Max-Daily-Session | 110                                | :=   |


raduisd.conf important bits (I think this should suffice):

        counter {
                filename = ${raddbdir}/db.counter
                key = User-Name
                count-attribute = Acct-Session-Time
                reset = daily
                counter-name = Daily-Session-Time
                check-name = Max-Daily-Session
                allowed-servicetype = Framed-User
                cache-size = 5000
        }


authorize {
        suffix
        files
        sql
        counter
}

authenticate {}

accounting {
        detail
        counter
        radutmp
        sql
}

session {
        radutmp
}


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

Reply via email to