Hello,
after looking for a solution in different forums and on this mailing list without any success I decide to post my problem here.
I'm having trouble to get the good Session-Timeout at the first request.
Example: one user with Max-All-Session:=900 try to connect:

r...@server:~# radtest jalmjdm nqbnmwcp 127.0.0.1 1812 secret
Sending Access-Request of id 197 to 127.0.0.1 port 1812
        User-Name = "jalmjdm"
        User-Password = "nqbnmwcp"
        NAS-IP-Address = 127.0.1.1
        NAS-Port = 1812
rad_recv: Access-Accept packet from host 127.0.0.1 port 1812, id=197, length=78
        WISPr-Redirection-URL = "http://www.google.ca";
        WISPr-Bandwidth-Max-Up = 128000
        WISPr-Bandwidth-Max-Down = 512000
        Session-Timeout = 2537321

But the next request give the good answer:
r...@server:~# radtest jalmjdm nqbnmwcp 127.0.0.1 1812 secret
Sending Access-Request of id 174 to 127.0.0.1 port 1812
        User-Name = "jalmjdm"
        User-Password = "nqbnmwcp"
        NAS-IP-Address = 127.0.1.1
        NAS-Port = 1812
rad_recv: Access-Accept packet from host 127.0.0.1 port 1812, id=174, length=78
        WISPr-Redirection-URL = "http://www.google.ca";
        WISPr-Bandwidth-Max-Up = 128000
        WISPr-Bandwidth-Max-Down = 512000
        Session-Timeout = 886

I heard about a conflict problem with authorize parameters but I haven't figured out how to fix it. Here is my config:

sqlcounter noresetcounter {
                  counter-name = Max-All-Session-Time
                  check-name = "Max-All-Session"
                  sqlmod-inst = sql
                  key = User-Name
                  reset = never
query = "SELECT SUM(AcctSessionTime) FROM radacct WHERE UserName='%{%k}'"
}

#############AUHTORIZE SECTION####################
instantiate {
        #
        # Allows the execution of external scripts.
        # The entire command line (and output) must fit into 253 bytes.
        #
        # e.g. Framed-Pool = `%{exec:/bin/echo foo}`
        exec
        #
        #
        #  The expression module doesn't do authorization,
        #  authentication, or accounting.  It only does dynamic
        #  translation, of the form:
        #
        #       Session-Timeout = `%{expr:2 + 3}`

        #  So the module needs to be instantiated, but CANNOT be
        #  listed in any other section.  See 'doc/rlm_expr' for
        expr
        noresetcounter
        expiration
        logintime
}

authorize {
        preprocess
        suffix
        chap
        mschap
        sql
        files
        noresetcounter
        hourlycounter
        dailycounter
        monthlycounter
        weeklycounter
        yearlycounter

        totaloctetyearlycounter
        totaloctetmonthlycounter
        totaloctethourlycounter
        totaloctetdaylycounter

        outputyearlycounter
        outputmonthlycounter
        outputhourlycounter
        outputdaylycounter

        inputyearlycounter
        inputmonthlycounter
        inputhourlycounter
        inputdaylycounter
}
Thanks for your help
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to