Menu

FreeRADIUS and RADIUSDesk running on different machines

Help
2013-10-18
2013-11-11
  • Fernando Azevedo

    Hi All,

    Is it possible to have RADIUSDesk and FreeRADIUS running on different machines? Has anyone tested such a scenario?

    Thank you,
    Fernando

     
  • Dirk van der Walt

    Hi Fernando,

    It should be possible, just also remember to change the settings on FreeRADIUS to point to the external DB instead of the local one.

    The only functionality which you will not have will be the Websocket logfile viewer and debug viewer for FreeRADIUS since FreeRADIUS will not be running on the machine that has the web server etc....

     
  • Fernando Azevedo

    Hi Dirk,

    I'll let you know the result as soon as I finish implementing it. In the meantime I am installing everything (again) in a single production machine because when installing in different ones (MySQL + FreeRADIUS and RADIUSDesk + Centralised Captive Portal) I get a weird "Double check NAS Secret" error... (and YES... I've double tripled checked the NAS secrets...)

    Cheers,
    Fernando

     
  • Dirk van der Walt

    Hi Fernando,

    There is a NAS defined also in the clients file of FreeRADIUS. Either remove that NAS or ensure it is the same as the one (in all settings) defined in the DB.

    Kind regards

     
  • Fernando Azevedo

    Hi Dirk,

    I've commented out the localhost section on the clients file of FreeRADIUS. Localhost is being loaded through SQL.

    The other NAS I have configured is also well loaded through SQL, as per the following logs:

    rlm_sql (sql): Read entry nasname=127.0.0.1,shortname=localhost,secret=testing123
    rlm_sql (sql): Adding client 127.0.0.1 (localhost, server=<none>) to clients list
    rlm_sql (sql): Read entry nasname=10.200.2.13,shortname=CPortal,secret=CPORTAL_SECRET
    rlm_sql (sql): Adding client 10.200.2.13 (CPortal, server=<none>) to clients list
    

    However, I keep getting an "Authentication failure please try again" error message.

    From the FreeRadius logs I get:

    [pap] login attempt with password " ???0?[?B3?7?? I"
    [pap] Using clear text password "password"
    [pap] Passwords don't match
    

    But I am sure about the "password" password that I am typing... Also, When I use the embedded Radius client in RADIUSDEsk the outcome is positive:

    Request Attributes
    User-Name = fazevedo
    User-Password = password
    
    Reply Attributes
    WISPr-Bandwidth-Max-Up = 384000
    WISPr-Bandwidth-Max-Down = 384000
    Session-Timeout = 3600
    

    Any hints where I should be looking for what I am doing wrong?

    Cheers,
    Fernando

    PS: The full log files are bellow:

    system@HOTSPOTRADIUS:/usr/local/etc/raddb$ sudo radiusd -X
    FreeRADIUS Version 2.2.0, for host i686-pc-linux-gnu, built on Oct 22 2013 at 00:43:27
    Copyright (C) 1999-2012 The FreeRADIUS server project and contributors. 
    There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A 
    PARTICULAR PURPOSE. 
    You may redistribute copies of FreeRADIUS under the terms of the 
    GNU General Public License v2. 
    Starting - reading configuration files ...
    including configuration file /usr/local/etc/raddb/radiusd.conf
    including configuration file /usr/local/etc/raddb/proxy.conf
    including configuration file /usr/local/etc/raddb/clients.conf
    including files in directory /usr/local/etc/raddb/modules/
    including configuration file /usr/local/etc/raddb/modules/sql_log
    including configuration file /usr/local/etc/raddb/modules/radutmp
    including configuration file /usr/local/etc/raddb/modules/otp
    including configuration file /usr/local/etc/raddb/modules/realm
    including configuration file /usr/local/etc/raddb/modules/acct_unique
    including configuration file /usr/local/etc/raddb/modules/expiration
    including configuration file /usr/local/etc/raddb/modules/ntlm_auth
    including configuration file /usr/local/etc/raddb/modules/smbpasswd
    including configuration file /usr/local/etc/raddb/modules/logintime
    including configuration file /usr/local/etc/raddb/modules/counter
    including configuration file /usr/local/etc/raddb/modules/dynamic_clients
    including configuration file /usr/local/etc/raddb/modules/sqlcounter_expire_on_login
    including configuration file /usr/local/etc/raddb/modules/policy
    including configuration file /usr/local/etc/raddb/modules/echo
    including configuration file /usr/local/etc/raddb/modules/pap
    including configuration file /usr/local/etc/raddb/modules/cui
    including configuration file /usr/local/etc/raddb/modules/replicate
    including configuration file /usr/local/etc/raddb/modules/krb5
    including configuration file /usr/local/etc/raddb/modules/ldap
    including configuration file /usr/local/etc/raddb/modules/rediswho
    including configuration file /usr/local/etc/raddb/modules/inner-eap
    including configuration file /usr/local/etc/raddb/modules/checkval
    including configuration file /usr/local/etc/raddb/modules/attr_filter
    including configuration file /usr/local/etc/raddb/modules/chap
    including configuration file /usr/local/etc/raddb/modules/ippool
    including configuration file /usr/local/etc/raddb/modules/pl_check_usage_data
    including configuration file /usr/local/etc/raddb/modules/unix
    including configuration file /usr/local/etc/raddb/modules/linelog
    including configuration file /usr/local/etc/raddb/modules/wimax
    including configuration file /usr/local/etc/raddb/modules/redis
    including configuration file /usr/local/etc/raddb/modules/preprocess
    including configuration file /usr/local/etc/raddb/modules/mschap
    including configuration file /usr/local/etc/raddb/modules/attr_rewrite
    including configuration file /usr/local/etc/raddb/modules/soh
    including configuration file /usr/local/etc/raddb/modules/pl_check_activation
    including configuration file /usr/local/etc/raddb/modules/mac2ip
    including configuration file /usr/local/etc/raddb/modules/expr
    including configuration file /usr/local/etc/raddb/modules/sradutmp
    including configuration file /usr/local/etc/raddb/modules/passwd
    including configuration file /usr/local/etc/raddb/modules/always
    including configuration file /usr/local/etc/raddb/modules/pl_check_usage_time
    including configuration file /usr/local/etc/raddb/modules/exec
    including configuration file /usr/local/etc/raddb/modules/files
    including configuration file /usr/local/etc/raddb/modules/raw
    including configuration file /usr/local/etc/raddb/modules/pam
    including configuration file /usr/local/etc/raddb/modules/pl_reset_time_for_data
    including configuration file /usr/local/etc/raddb/modules/smsotp
    including configuration file /usr/local/etc/raddb/modules/detail
    including configuration file /usr/local/etc/raddb/modules/digest
    including configuration file /usr/local/etc/raddb/modules/mac2vlan
    including configuration file /usr/local/etc/raddb/modules/pl_check_usage
    including configuration file /usr/local/etc/raddb/modules/pl_reset_time
    including configuration file /usr/local/etc/raddb/modules/pl_reset_time_for_time
    including configuration file /usr/local/etc/raddb/modules/opendirectory
    including configuration file /usr/local/etc/raddb/modules/etc_group
    including configuration file /usr/local/etc/raddb/modules/perl
    including configuration file /usr/local/etc/raddb/modules/detail.example.com
    including configuration file /usr/local/etc/raddb/modules/detail.log
    including configuration file /usr/local/etc/raddb/eap.conf
    including configuration file /usr/local/etc/raddb/sql.conf
    including configuration file /usr/local/etc/raddb/sql/mysql/dialup.conf
    including configuration file /usr/local/etc/raddb/policy.conf
    including files in directory /usr/local/etc/raddb/sites-enabled/
    including configuration file /usr/local/etc/raddb/sites-enabled/inner-tunnel
    including configuration file /usr/local/etc/raddb/sites-enabled/dynamic-clients
    including configuration file /usr/local/etc/raddb/sites-enabled/control-socket
    including configuration file /usr/local/etc/raddb/sites-enabled/default
    main {
        allow_core_dumps = no
    }
    including dictionary file /usr/local/etc/raddb/dictionary
    main {
        name = "radiusd"
        prefix = "/usr/local"
        localstatedir = "/usr/local/var"
        sbindir = "/usr/local/sbin"
        logdir = "/usr/local/var/log/radius"
        run_dir = "/usr/local/var/run/radiusd"
        libdir = "/usr/local/lib"
        radacctdir = "/usr/local/var/log/radius/radacct"
        hostname_lookups = no
        max_request_time = 30
        cleanup_delay = 5
        max_requests = 1024
        pidfile = "/usr/local/var/run/radiusd/radiusd.pid"
        checkrad = "/usr/local/sbin/checkrad"
        debug_level = 0
        proxy_requests = yes
     log {
        stripped_names = no
        auth = no
        auth_badpass = no
        auth_goodpass = no
     }
     security {
        max_attributes = 200
        reject_delay = 1
        status_server = yes
     }
    }
    radiusd: #### Loading Realms and Home Servers ####
     proxy server {
        retry_delay = 5
        retry_count = 3
        default_fallback = no
        dead_time = 120
        wake_all_if_all_dead = no
     }
     home_server localhost {
        ipaddr = 127.0.0.1
        port = 1812
        type = "auth"
        secret = "testing123"
        response_window = 20
        max_outstanding = 65536
        require_message_authenticator = yes
        zombie_period = 40
        status_check = "status-server"
        ping_interval = 30
        check_interval = 30
        num_answers_to_alive = 3
        num_pings_to_alive = 3
        revive_interval = 120
        status_check_timeout = 4
      coa {
        irt = 2
        mrt = 16
        mrc = 5
        mrd = 30
      }
     }
     home_server_pool my_auth_failover {
        type = fail-over
        home_server = localhost
     }
     realm example.com {
        auth_pool = my_auth_failover
     }
     realm LOCAL {
     }
    radiusd: #### Loading Clients ####
     client dymamic {
        ipaddr = 0.0.0.0
        netmask = 0
        require_message_authenticator = no
        dynamic_clients = "dynamic_client_server"
        lifetime = 86400
     }
    radiusd: #### Instantiating modules ####
     instantiate {
     Module: Linked to module rlm_exec
     Module: Instantiating module "exec" from file /usr/local/etc/raddb/modules/exec
      exec {
        wait = no
        input_pairs = "request"
        shell_escape = yes
      }
     Module: Linked to module rlm_expr
     Module: Instantiating module "expr" from file /usr/local/etc/raddb/modules/expr
     Module: Linked to module rlm_expiration
     Module: Instantiating module "expiration" from file /usr/local/etc/raddb/modules/expiration
      expiration {
        reply-message = "Your account has expired, %{User-Name}  "
      }
     Module: Linked to module rlm_logintime
     Module: Instantiating module "logintime" from file /usr/local/etc/raddb/modules/logintime
      logintime {
        reply-message = "You are calling outside your allowed timespan  "
        minimum-timeout = 60
      }
     Module: Linked to module rlm_raw
     Module: Instantiating module "raw" from file /usr/local/etc/raddb/modules/raw
     }
    radiusd: #### Loading Virtual Servers ####
    server { # from file /usr/local/etc/raddb/radiusd.conf
     modules {
      Module: Creating Auth-Type = digest
      Module: Creating Post-Auth-Type = REJECT
     Module: Checking authenticate {...} for more modules to load
     Module: Linked to module rlm_pap
     Module: Instantiating module "pap" from file /usr/local/etc/raddb/modules/pap
      pap {
        encryption_scheme = "auto"
        auto_header = no
      }
     Module: Linked to module rlm_chap
     Module: Instantiating module "chap" from file /usr/local/etc/raddb/modules/chap
     Module: Linked to module rlm_mschap
     Module: Instantiating module "mschap" from file /usr/local/etc/raddb/modules/mschap
      mschap {
        use_mppe = yes
        require_encryption = no
        require_strong = no
        with_ntdomain_hack = no
        allow_retry = yes
      }
     Module: Linked to module rlm_digest
     Module: Instantiating module "digest" from file /usr/local/etc/raddb/modules/digest
     Module: Linked to module rlm_unix
     Module: Instantiating module "unix" from file /usr/local/etc/raddb/modules/unix
      unix {
        radwtmp = "/usr/local/var/log/radius/radwtmp"
      }
     Module: Linked to module rlm_eap
     Module: Instantiating module "eap" from file /usr/local/etc/raddb/eap.conf
      eap {
        default_eap_type = "md5"
        timer_expire = 60
        ignore_unknown_eap_types = no
        cisco_accounting_username_bug = no
        max_sessions = 4096
      }
     Module: Linked to sub-module rlm_eap_md5
     Module: Instantiating eap-md5
     Module: Linked to sub-module rlm_eap_leap
     Module: Instantiating eap-leap
     Module: Linked to sub-module rlm_eap_gtc
     Module: Instantiating eap-gtc
       gtc {
        challenge = "Password: "
        auth_type = "PAP"
       }
     Module: Linked to sub-module rlm_eap_tls
     Module: Instantiating eap-tls
       tls {
        rsa_key_exchange = no
        dh_key_exchange = yes
        rsa_key_length = 512
        dh_key_length = 512
        verify_depth = 0
        CA_path = "/usr/local/etc/raddb/certs"
        pem_file_type = yes
        private_key_file = "/usr/local/etc/raddb/certs/server.pem"
        certificate_file = "/usr/local/etc/raddb/certs/server.pem"
        CA_file = "/usr/local/etc/raddb/certs/ca.pem"
        private_key_password = "whatever"
        dh_file = "/usr/local/etc/raddb/certs/dh"
        random_file = "/usr/local/etc/raddb/certs/random"
        fragment_size = 1024
        include_length = yes
        check_crl = no
        cipher_list = "DEFAULT"
        make_cert_command = "/usr/local/etc/raddb/certs/bootstrap"
        ecdh_curve = "prime256v1"
        cache {
        enable = no
        lifetime = 24
        max_entries = 255
        }
        verify {
        }
        ocsp {
        enable = no
        override_cert_url = yes
        url = "http://127.0.0.1/ocsp/"
        use_nonce = yes
        timeout = 0
        softfail = no
        }
       }
     Module: Linked to sub-module rlm_eap_ttls
     Module: Instantiating eap-ttls
       ttls {
        default_eap_type = "md5"
        copy_request_to_tunnel = yes
        use_tunneled_reply = yes
        virtual_server = "inner-tunnel"
        include_length = yes
       }
     Module: Linked to sub-module rlm_eap_peap
     Module: Instantiating eap-peap
       peap {
        default_eap_type = "mschapv2"
        copy_request_to_tunnel = yes
        use_tunneled_reply = yes
        proxy_tunneled_request_as_eap = yes
        virtual_server = "inner-tunnel"
        soh = no
       }
     Module: Linked to sub-module rlm_eap_mschapv2
     Module: Instantiating eap-mschapv2
       mschapv2 {
        with_ntdomain_hack = no
        send_error = no
       }
     Module: Checking authorize {...} for more modules to load
     Module: Linked to module rlm_preprocess
     Module: Instantiating module "preprocess" from file /usr/local/etc/raddb/modules/preprocess
      preprocess {
        huntgroups = "/usr/local/etc/raddb/huntgroups"
        hints = "/usr/local/etc/raddb/hints"
        with_ascend_hack = no
        ascend_channels_per_line = 23
        with_ntdomain_hack = no
        with_specialix_jetstream_hack = no
        with_cisco_vsa_hack = no
        with_alvarion_vsa_hack = no
      }
    reading pairlist file /usr/local/etc/raddb/huntgroups
    reading pairlist file /usr/local/etc/raddb/hints
     Module: Loading virtual module rewrite.calling_station_id
     Module: Linked to module rlm_always
     Module: Instantiating module "updated" from file /usr/local/etc/raddb/modules/always
      always updated {
        rcode = "updated"
        simulcount = 0
        mpp = no
      }
     Module: Instantiating module "noop" from file /usr/local/etc/raddb/modules/always
      always noop {
        rcode = "noop"
        simulcount = 0
        mpp = no
      }
     Module: Linked to module rlm_realm
     Module: Instantiating module "suffix" from file /usr/local/etc/raddb/modules/realm
      realm suffix {
        format = "suffix"
        delimiter = "@"
        ignore_default = no
        ignore_null = no
      }
     Module: Loading virtual module RADIUSdesk_main
     Module: Instantiating module "reject" from file /usr/local/etc/raddb/modules/always
      always reject {
        rcode = "reject"
        simulcount = 0
        mpp = no
      }
     Module: Loading virtual module RADIUSdesk_device_check
     Module: Loading virtual module RADIUSdesk_user_check
     Module: Linked to module rlm_sql
     Module: Instantiating module "sql" from file /usr/local/etc/raddb/sql.conf
      sql {
        driver = "rlm_sql_mysql"
        server = "localhost"
        port = ""
        login = "rd"
        password = "DB_ROOT_PASSWORD!"
        radius_db = "rd"
        read_groups = yes
        sqltrace = no
        sqltracefile = "/usr/local/var/log/radius/sqltrace.sql"
        readclients = yes
        deletestalesessions = yes
        num_sql_socks = 5
        lifetime = 0
        max_queries = 0
        sql_user_name = "%{User-Name}"
        default_user_profile = ""
        nas_query = "SELECT id, nasname, shortname, type, secret, server FROM nas"
        authorize_check_query = "SELECT id, username, attribute, value, op           FROM radcheck           WHERE username = '%{SQL-User-Name}'           ORDER BY id"
        authorize_reply_query = "SELECT id, username, attribute, value, op           FROM radreply           WHERE username = '%{SQL-User-Name}'           ORDER BY id"
        authorize_group_check_query = "SELECT id, groupname, attribute,           Value, op           FROM radgroupcheck           WHERE groupname = '%{Sql-Group}'           ORDER BY id"
        authorize_group_reply_query = "SELECT id, groupname, attribute,           value, op           FROM radgroupreply           WHERE groupname = '%{Sql-Group}'           ORDER BY id"
        accounting_onoff_query = "          UPDATE radacct           SET              acctstoptime       =  '%S',              acctsessiontime    =  unix_timestamp('%S') -                                    unix_timestamp(acctstarttime),              acctterminatecause =  '%{Acct-Terminate-Cause}',              acctstopdelay      =  %{%{Acct-Delay-Time}:-0}           WHERE acctstoptime IS NULL           AND nasipaddress      =  '%{NAS-IP-Address}'       AND nasidentifier =  '%{%{NAS-Identifier}:-Not in request}'           AND acctstarttime     <= '%S'"
        accounting_update_query = "           UPDATE radacct           SET              framedipaddress = '%{Framed-IP-Address}',              acctsessiontime     = '%{Acct-Session-Time}',              acctinputoctets     = '%{%{Acct-Input-Gigawords}:-0}'  << 32 |                                    '%{%{Acct-Input-Octets}:-0}',              acctoutputoctets    = '%{%{Acct-Output-Gigawords}:-0}' << 32 |                                    '%{%{Acct-Output-Octets}:-0}'           WHERE acctsessionid = '%{Acct-Session-Id}'           AND username        = '%{SQL-User-Name}'    AND nasidentifier   =  '%{%{NAS-Identifier}:-Not in request}'           AND nasipaddress    = '%{NAS-IP-Address}'"
        accounting_update_query_alt = "           INSERT INTO radacct             (acctsessionid,    acctuniqueid,      username,              realm,            nasipaddress,      nasidentifier, nasportid,              nasporttype,      acctstarttime,     acctsessiontime,              acctauthentic,    connectinfo_start, acctinputoctets,              acctoutputoctets, calledstationid,   callingstationid,              servicetype,      framedprotocol,    framedipaddress,              acctstartdelay,   xascendsessionsvrkey)           VALUES             ('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}',              '%{SQL-User-Name}',              '%{Realm}', '%{NAS-IP-Address}', '%{%{NAS-Identifier}:-Not in request}' ,'%{NAS-Port}',              '%{NAS-Port-Type}',              DATE_SUB('%S',                       INTERVAL (%{%{Acct-Session-Time}:-0} +                                 %{%{Acct-Delay-Time}:-0}) SECOND),                       '%{Acct-Session-Time}',              '%{Acct-Authentic}', '',              '%{%{Acct-Input-Gigawords}:-0}' << 32 |              '%{%{Acct-Input-Octets}:-0}',              '%{%{Acct-Output-Gigawords}:-0}' << 32 |              '%{%{Acct-Output-Octets}:-0}',              '%{Called-Station-Id}', '%{Calling-Station-Id}',              '%{Service-Type}', '%{Framed-Protocol}',              '%{Framed-IP-Address}',              '0', '%{X-Ascend-Session-Svr-Key}')"
        accounting_start_query = "           INSERT INTO radacct             (acctsessionid,    acctuniqueid,     username,              realm,            nasipaddress,     nasidentifier, nasportid,              nasporttype,      acctstarttime,    acctstoptime,              acctsessiontime,  acctauthentic,    connectinfo_start,              connectinfo_stop, acctinputoctets,  acctoutputoctets,              calledstationid,  callingstationid, acctterminatecause,              servicetype,      framedprotocol,   framedipaddress,              acctstartdelay,   acctstopdelay,    xascendsessionsvrkey)           VALUES             ('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}',              '%{SQL-User-Name}',              '%{Realm}', '%{NAS-IP-Address}', '%{%{NAS-Identifier}:-Not in request}', '%{NAS-Port}',              '%{NAS-Port-Type}', '%S', NULL,              '0', '%{Acct-Authentic}', '%{Connect-Info}',              '', '0', '0',              '%{Called-Station-Id}', '%{Calling-Station-Id}', '',              '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}',              '%{%{Acct-Delay-Time}:-0}', '0', '%{X-Ascend-Session-Svr-Key}')"
        accounting_start_query_alt = "           UPDATE radacct SET              acctstarttime     = '%S',              acctstartdelay    = '%{%{Acct-Delay-Time}:-0}',              connectinfo_start = '%{Connect-Info}'           WHERE acctsessionid  = '%{Acct-Session-Id}'           AND username         = '%{SQL-User-Name}'           AND nasipaddress     = '%{NAS-IP-Address}'     AND nasidentifier    = '%{%{NAS-Identifier}:-Not in request}'"
        accounting_stop_query = "           UPDATE radacct SET              acctstoptime       = '%S',              acctsessiontime    = '%{Acct-Session-Time}',              acctinputoctets    = '%{%{Acct-Input-Gigawords}:-0}' << 32 |                                   '%{%{Acct-Input-Octets}:-0}',              acctoutputoctets   = '%{%{Acct-Output-Gigawords}:-0}' << 32 |                                   '%{%{Acct-Output-Octets}:-0}',              acctterminatecause = '%{Acct-Terminate-Cause}',              acctstopdelay      = '%{%{Acct-Delay-Time}:-0}',              connectinfo_stop   = '%{Connect-Info}'           WHERE acctsessionid   = '%{Acct-Session-Id}'           AND username          = '%{SQL-User-Name}'           AND nasipaddress      = '%{NAS-IP-Address}'       AND nasidentifier = '%{%{NAS-Identifier}:-Not in request}'"
        accounting_stop_query_alt = "           INSERT INTO radacct             (acctsessionid, acctuniqueid, username,              realm, nasipaddress, nasidentifier, nasportid,              nasporttype, acctstarttime, acctstoptime,              acctsessiontime, acctauthentic, connectinfo_start,              connectinfo_stop, acctinputoctets, acctoutputoctets,              calledstationid, callingstationid, acctterminatecause,              servicetype, framedprotocol, framedipaddress,              acctstartdelay, acctstopdelay)           VALUES             ('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}',              '%{SQL-User-Name}',              '%{Realm}', '%{NAS-IP-Address}', '%{%{NAS-Identifier}:-Not in request}', '%{NAS-Port}',              '%{NAS-Port-Type}',              DATE_SUB('%S',                  INTERVAL (%{%{Acct-Session-Time}:-0} +                  %{%{Acct-Delay-Time}:-0}) SECOND),              '%S', '%{Acct-Session-Time}', '%{Acct-Authentic}', '',              '%{Connect-Info}',              '%{%{Acct-Input-Gigawords}:-0}' << 32 |              '%{%{Acct-Input-Octets}:-0}',              '%{%{Acct-Output-Gigawords}:-0}' << 32 |              '%{%{Acct-Output-Octets}:-0}',              '%{Called-Station-Id}', '%{Calling-Station-Id}',              '%{Acct-Terminate-Cause}',              '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}',              '0', '%{%{Acct-Delay-Time}:-0}')"
        group_membership_query = "SELECT groupname           FROM radusergroup           WHERE username = '%{SQL-User-Name}'           ORDER BY priority"
        connect_failure_retry_delay = 60
        simul_count_query = "SELECT COUNT(*)                              FROM radacct                              WHERE username = '%{SQL-User-Name}'                              AND acctstoptime IS NULL"
        simul_verify_query = "SELECT radacctid, acctsessionid, username,                                nasipaddress, nasportid, framedipaddress,                                callingstationid, framedprotocol                                FROM radacct                                WHERE username = '%{SQL-User-Name}'                                AND acctstoptime IS NULL"
        postauth_query = "INSERT INTO radpostauth           (username, realm, pass, reply, nasname, authdate)           VALUES (            '%{User-Name}',         '%{%{Realm}:- unknown}',            '%{%{User-Password}:-%{Chap-Password}}',            '%{reply:Packet-Type}',             '%{%{Nas-IP-Address}:-%{request:Packet-Src-IP-Address}}',           '%S')"
        safe-characters = "@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_: /"
      }
    rlm_sql (sql): Driver rlm_sql_mysql (module rlm_sql_mysql) loaded and linked
    rlm_sql (sql): Attempting to connect to rd@localhost:/rd
    rlm_sql (sql): starting 0
    rlm_sql (sql): Attempting to connect rlm_sql_mysql #0
    rlm_sql_mysql: Starting connect to MySQL server for #0
    rlm_sql (sql): Connected new DB handle, #0
    rlm_sql (sql): starting 1
    rlm_sql (sql): Attempting to connect rlm_sql_mysql #1
    rlm_sql_mysql: Starting connect to MySQL server for #1
    rlm_sql (sql): Connected new DB handle, #1
    rlm_sql (sql): starting 2
    rlm_sql (sql): Attempting to connect rlm_sql_mysql #2
    rlm_sql_mysql: Starting connect to MySQL server for #2
    rlm_sql (sql): Connected new DB handle, #2
    rlm_sql (sql): starting 3
    rlm_sql (sql): Attempting to connect rlm_sql_mysql #3
    rlm_sql_mysql: Starting connect to MySQL server for #3
    rlm_sql (sql): Connected new DB handle, #3
    rlm_sql (sql): starting 4
    rlm_sql (sql): Attempting to connect rlm_sql_mysql #4
    rlm_sql_mysql: Starting connect to MySQL server for #4
    rlm_sql (sql): Connected new DB handle, #4
    rlm_sql (sql): Processing generate_sql_clients
    rlm_sql (sql) in generate_sql_clients: query is SELECT id, nasname, shortname, type, secret, server FROM nas
    rlm_sql (sql): Reserving sql socket id: 4
    rlm_sql (sql): Read entry nasname=127.0.0.1,shortname=localhost,secret=testing123
    rlm_sql (sql): Adding client 127.0.0.1 (localhost, server=<none>) to clients list
    rlm_sql (sql): Read entry nasname=10.200.2.13,shortname=CPortal,secret=CPORTAL_SECRET
    rlm_sql (sql): Adding client 10.200.2.13 (CPortal, server=<none>) to clients list
    rlm_sql (sql): Released sql socket id: 4
     Module: Linked to module rlm_perl
     Module: Instantiating module "pl_check_activation" from file /usr/local/etc/raddb/modules/pl_check_activation
      perl pl_check_activation {
        module = "/usr/local/etc/raddb/check_activation.pl"
        func_authorize = "authorize"
        func_authenticate = "authenticate"
        func_accounting = "accounting"
        func_preacct = "preacct"
        func_checksimul = "checksimul"
        func_detach = "detach"
        func_xlat = "xlat"
        func_pre_proxy = "pre_proxy"
        func_post_proxy = "post_proxy"
        func_post_auth = "post_auth"
        func_recv_coa = "recv_coa"
        func_send_coa = "send_coa"
      }
    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
        LANGUAGE = "en_ZA:en",
        LC_ALL = (unset),
        LC_CTYPE = "UTF-8",
        LANG = "en_ZA.UTF-8"
        are supported and installed on your system.
    perl: warning: Falling back to the standard locale ("C").
     Module: Loading virtual module RADIUSdesk_data_counter
     Module: Instantiating module "pl_reset_time_for_data" from file /usr/local/etc/raddb/modules/pl_reset_time_for_data
      perl pl_reset_time_for_data {
        module = "/usr/local/etc/raddb/reset_time_for_data.pl"
        func_authorize = "authorize"
        func_authenticate = "authenticate"
        func_accounting = "accounting"
        func_preacct = "preacct"
        func_checksimul = "checksimul"
        func_detach = "detach"
        func_xlat = "xlat"
        func_pre_proxy = "pre_proxy"
        func_post_proxy = "post_proxy"
        func_post_auth = "post_auth"
        func_recv_coa = "recv_coa"
        func_send_coa = "send_coa"
      }
    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
        LANGUAGE = "en_ZA:en",
        LC_ALL = (unset),
        LC_CTYPE = "UTF-8",
        LANG = "en_ZA.UTF-8"
        are supported and installed on your system.
    perl: warning: Falling back to the standard locale ("C").
     Module: Instantiating module "pl_check_usage_data" from file /usr/local/etc/raddb/modules/pl_check_usage_data
      perl pl_check_usage_data {
        module = "/usr/local/etc/raddb/check_usage_data.pl"
        func_authorize = "authorize"
        func_authenticate = "authenticate"
        func_accounting = "accounting"
        func_preacct = "preacct"
        func_checksimul = "checksimul"
        func_detach = "detach"
        func_xlat = "xlat"
        func_pre_proxy = "pre_proxy"
        func_post_proxy = "post_proxy"
        func_post_auth = "post_auth"
        func_recv_coa = "recv_coa"
        func_send_coa = "send_coa"
      }
    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
        LANGUAGE = "en_ZA:en",
        LC_ALL = (unset),
        LC_CTYPE = "UTF-8",
        LANG = "en_ZA.UTF-8"
        are supported and installed on your system.
    perl: warning: Falling back to the standard locale ("C").
     Module: Loading virtual module RADIUSdesk_time_counter
     Module: Instantiating module "pl_reset_time_for_time" from file /usr/local/etc/raddb/modules/pl_reset_time_for_time
      perl pl_reset_time_for_time {
        module = "/usr/local/etc/raddb/reset_time_for_time.pl"
        func_authorize = "authorize"
        func_authenticate = "authenticate"
        func_accounting = "accounting"
        func_preacct = "preacct"
        func_checksimul = "checksimul"
        func_detach = "detach"
        func_xlat = "xlat"
        func_pre_proxy = "pre_proxy"
        func_post_proxy = "post_proxy"
        func_post_auth = "post_auth"
        func_recv_coa = "recv_coa"
        func_send_coa = "send_coa"
      }
    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
        LANGUAGE = "en_ZA:en",
        LC_ALL = (unset),
        LC_CTYPE = "UTF-8",
        LANG = "en_ZA.UTF-8"
        are supported and installed on your system.
    perl: warning: Falling back to the standard locale ("C").
     Module: Instantiating module "pl_check_usage_time" from file /usr/local/etc/raddb/modules/pl_check_usage_time
      perl pl_check_usage_time {
        module = "/usr/local/etc/raddb/check_usage_time.pl"
        func_authorize = "authorize"
        func_authenticate = "authenticate"
        func_accounting = "accounting"
        func_preacct = "preacct"
        func_checksimul = "checksimul"
        func_detach = "detach"
        func_xlat = "xlat"
        func_pre_proxy = "pre_proxy"
        func_post_proxy = "post_proxy"
        func_post_auth = "post_auth"
        func_recv_coa = "recv_coa"
        func_send_coa = "send_coa"
      }
    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
        LANGUAGE = "en_ZA:en",
        LC_ALL = (unset),
        LC_CTYPE = "UTF-8",
        LANG = "en_ZA.UTF-8"
        are supported and installed on your system.
    perl: warning: Falling back to the standard locale ("C").
     Module: Loading virtual module RADIUSdesk_voucher_check
     Module: Loading virtual module RADIUSdesk_realm_nas_check
     Module: Loading virtual module RADIUSdesk_device_owner_check
     Module: Loading virtual module RADIUSdesk_user_check
     Module: Loading virtual module RADIUSdesk_data_counter
     Module: Loading virtual module RADIUSdesk_time_counter
     Module: Loading virtual module RADIUSdesk_voucher_check
     Module: Loading virtual module RADIUSdesk_realm_nas_check
     Module: Loading virtual module RADIUSdesk_user_check
     Module: Loading virtual module RADIUSdesk_data_counter
     Module: Loading virtual module RADIUSdesk_time_counter
     Module: Loading virtual module RADIUSdesk_voucher_check
     Module: Loading virtual module RADIUSdesk_realm_nas_check
     Module: Loading virtual module RADIUSdesk_user_check
     Module: Loading virtual module RADIUSdesk_data_counter
     Module: Loading virtual module RADIUSdesk_time_counter
     Module: Loading virtual module RADIUSdesk_voucher_check
     Module: Loading virtual module RADIUSdesk_realm_nas_check
     Module: Linked to module rlm_files
     Module: Instantiating module "files" from file /usr/local/etc/raddb/modules/files
      files {
        usersfile = "/usr/local/etc/raddb/users"
        acctusersfile = "/usr/local/etc/raddb/acct_users"
        preproxy_usersfile = "/usr/local/etc/raddb/preproxy_users"
        compat = "no"
      }
    reading pairlist file /usr/local/etc/raddb/users
    reading pairlist file /usr/local/etc/raddb/acct_users
    reading pairlist file /usr/local/etc/raddb/preproxy_users
     Module: Loading virtual module RADIUSdesk_session_timeout
     Module: Checking preacct {...} for more modules to load
     Module: Linked to module rlm_acct_unique
     Module: Instantiating module "acct_unique" from file /usr/local/etc/raddb/modules/acct_unique
      acct_unique {
        key = "User-Name, Acct-Session-Id, NAS-IP-Address, Client-IP-Address, NAS-Port"
      }
     Module: Loading virtual module RADIUSdesk_preacct
     Module: Loading virtual module rewrite.calling_station_id
     Module: Loading virtual module RADIUSdesk_set_acct_realm
     Module: Loading virtual module RADIUSdesk_async_acct
     Module: Checking accounting {...} for more modules to load
     Module: Linked to module rlm_detail
     Module: Instantiating module "detail" from file /usr/local/etc/raddb/modules/detail
      detail {
        detailfile = "/usr/local/var/log/radius/radacct/%{%{Packet-Src-IP-Address}:-%{Packet-Src-IPv6-Address}}/detail-%Y%m%d"
        header = "%t"
        detailperm = 384
        dirperm = 493
        locking = no
        log_packet_header = no
      }
     Module: Linked to module rlm_radutmp
     Module: Instantiating module "radutmp" from file /usr/local/etc/raddb/modules/radutmp
      radutmp {
        filename = "/usr/local/var/log/radius/radutmp"
        username = "%{User-Name}"
        case_sensitive = yes
        check_with_nas = yes
        perm = 384
        callerid = yes
      }
     Module: Loading virtual module RADIUSdesk_acct
     Module: Linked to module rlm_attr_filter
     Module: Instantiating module "attr_filter.accounting_response" from file /usr/local/etc/raddb/modules/attr_filter
      attr_filter attr_filter.accounting_response {
        attrsfile = "/usr/local/etc/raddb/attrs.accounting_response"
        key = "%{User-Name}"
        relaxed = no
      }
    reading pairlist file /usr/local/etc/raddb/attrs.accounting_response
     Module: Checking session {...} for more modules to load
     Module: Checking post-proxy {...} for more modules to load
     Module: Checking post-auth {...} for more modules to load
     Module: Loading virtual module RADIUSdesk_last_accept
     Module: Loading virtual module RADIUSdesk_post_auth
     Module: Loading virtual module RADIUSdesk_auto_devices_check
     Module: Instantiating module "attr_filter.access_reject" from file /usr/local/etc/raddb/modules/attr_filter
      attr_filter attr_filter.access_reject {
        attrsfile = "/usr/local/etc/raddb/attrs.access_reject"
        key = "%{User-Name}"
        relaxed = no
      }
    reading pairlist file /usr/local/etc/raddb/attrs.access_reject
     Module: Loading virtual module RADIUSdesk_last_reject
     } # modules
    } # server
    server inner-tunnel { # from file /usr/local/etc/raddb/sites-enabled/inner-tunnel
     modules {
     Module: Checking authenticate {...} for more modules to load
     Module: Checking authorize {...} for more modules to load
     Module: Loading virtual module RADIUSdesk_main
     Module: Loading virtual module RADIUSdesk_device_check
     Module: Loading virtual module RADIUSdesk_user_check
     Module: Loading virtual module RADIUSdesk_data_counter
     Module: Loading virtual module RADIUSdesk_time_counter
     Module: Loading virtual module RADIUSdesk_voucher_check
     Module: Loading virtual module RADIUSdesk_realm_nas_check
     Module: Loading virtual module RADIUSdesk_device_owner_check
     Module: Loading virtual module RADIUSdesk_user_check
     Module: Loading virtual module RADIUSdesk_data_counter
     Module: Loading virtual module RADIUSdesk_time_counter
     Module: Loading virtual module RADIUSdesk_voucher_check
     Module: Loading virtual module RADIUSdesk_realm_nas_check
     Module: Loading virtual module RADIUSdesk_user_check
     Module: Loading virtual module RADIUSdesk_data_counter
     Module: Loading virtual module RADIUSdesk_time_counter
     Module: Loading virtual module RADIUSdesk_voucher_check
     Module: Loading virtual module RADIUSdesk_realm_nas_check
     Module: Loading virtual module RADIUSdesk_user_check
     Module: Loading virtual module RADIUSdesk_data_counter
     Module: Loading virtual module RADIUSdesk_time_counter
     Module: Loading virtual module RADIUSdesk_voucher_check
     Module: Loading virtual module RADIUSdesk_realm_nas_check
     Module: Checking session {...} for more modules to load
     Module: Checking post-proxy {...} for more modules to load
     Module: Checking post-auth {...} for more modules to load
     } # modules
    } # server
    server dynamic_client_server { # from file /usr/local/etc/raddb/sites-enabled/dynamic-clients
     modules {
     Module: Checking authorize {...} for more modules to load
     Module: Instantiating module "ok" from file /usr/local/etc/raddb/modules/always
      always ok {
        rcode = "ok"
        simulcount = 0
        mpp = no
      }
     } # modules
    } # server
    radiusd: #### Opening IP addresses and Ports ####
    listen {
        type = "auth"
        ipaddr = *
        port = 0
    }
    listen {
        type = "acct"
        ipaddr = *
        port = 0
    }
    listen {
        type = "control"
     listen {
        socket = "/usr/local/var/run/radiusd/radiusd.sock"
        mode = "rw"
     }
    }
    listen {
        type = "auth"
        ipaddr = 127.0.0.1
        port = 18120
    }
     ... adding new socket proxy address * port 34867
    Listening on authentication address * port 1812
    Listening on accounting address * port 1813
    Listening on command file /usr/local/var/run/radiusd/radiusd.sock
    Listening on authentication address 127.0.0.1 port 18120 as server inner-tunnel
    Listening on proxy address * port 1814
    Ready to process requests.
    
    rad_recv: Access-Request packet from host 10.200.2.13 port 44226, id=238, length=280
        ChilliSpot-Version = "1.3.0"
        User-Name = "fazevedo"
        User-Password = "\t\217\324\3240\202[\016B3\2267\330\327\rI"
        Service-Type = Login-User
        Acct-Session-Id = "5266433b00000004"
        Framed-IP-Address = 10.123.0.16
        NAS-Port-Type = Wireless-802.11
        NAS-Port = 4
        NAS-Port-Id = "00000004"
        Calling-Station-Id = "4C-B1-99-AC-F0-54"
        Called-Station-Id = "AA-2A-CC-8D-F8-21"
        NAS-IP-Address = 10.123.255.254
        NAS-Identifier = "CPortal"
        WISPr-Location-ID = "isocc=,cc=,ac=,network=Coova,"
        WISPr-Location-Name = "My_HotSpot"
        WISPr-Logoff-URL = "http://10.123.255.254:3990/logoff"
        Message-Authenticator = 0xadf07847b34d724a49ca411064408b7e
    # Executing section authorize from file /usr/local/etc/raddb/sites-enabled/default
    +- entering group authorize {...}
    ++[preprocess] returns ok
    ++- entering policy rewrite.calling_station_id {...}
    +++? if ((Calling-Station-Id) && "%{Calling-Station-Id}" =~ /^%{config:policy.mac-addr}$/i)
    ?? Evaluating (Calling-Station-Id) -> TRUE
        expand: %{Calling-Station-Id} -> 4C-B1-99-AC-F0-54
        expand: policy.mac-addr -> policy.mac-addr
        expand: ^%{config:policy.mac-addr}$ -> ^([0-9a-f]{2})[^0-9a-f]?([0-9a-f]{2})[^0-9a-f]?([0-9a-f]{2})[^0-9a-f]?([0-9a-f]{2})[^0-9a-f]?([0-9a-f]{2})[^0-9a-f]?([0-9a-f]{2})$
    ? Evaluating ("%{Calling-Station-Id}" =~ /^%{config:policy.mac-addr}$/i) -> TRUE
    +++? if ((Calling-Station-Id) && "%{Calling-Station-Id}" =~ /^%{config:policy.mac-addr}$/i) -> TRUE
    +++- entering if ((Calling-Station-Id) && "%{Calling-Station-Id}" =~ /^%{config:policy.mac-addr}$/i) {...}
        expand: %{1}-%{2}-%{3}-%{4}-%{5}-%{6} -> 4C-B1-99-AC-F0-54
        expand: %{tolower:%{1}-%{2}-%{3}-%{4}-%{5}-%{6}} -> 4c-b1-99-ac-f0-54
    ++++[request] returns ok
    ++++[updated] returns updated
    +++- if ((Calling-Station-Id) && "%{Calling-Station-Id}" =~ /^%{config:policy.mac-addr}$/i) returns updated
    +++ ... skipping else for request 0: Preceding "if" was taken
    ++- policy rewrite.calling_station_id returns updated
    ++[chap] returns noop
    ++[mschap] returns noop
    ++[digest] returns noop
    [suffix] No '@' in User-Name = "fazevedo", looking up realm NULL
    [suffix] No such realm "NULL"
    ++[suffix] returns noop
    ++? if (!EAP-Message)
    ? Evaluating !(EAP-Message) -> TRUE
    ++? if (!EAP-Message) -> TRUE
    ++- entering if (!EAP-Message) {...}
    +++- entering policy RADIUSdesk_main {...}
    ++++? if (request:User-Name =~ /([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})/i)
    ? Evaluating (request:User-Name =~ /([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})/i) -> FALSE
    ++++? if (request:User-Name =~ /([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})/i) -> FALSE
    ++++? if ("%{sql:SELECT count(username) FROM radcheck WHERE radcheck.username='%{request:User-Name}'}" == 0)
    sql_xlat
        expand: %{User-Name} -> fazevedo
    sql_set_user escaped user --> 'fazevedo'
        expand: SELECT count(username) FROM radcheck WHERE radcheck.username='%{request:User-Name}' -> SELECT count(username) FROM radcheck WHERE radcheck.username='fazevedo'
    rlm_sql (sql): Reserving sql socket id: 3
    sql_xlat finished
    rlm_sql (sql): Released sql socket id: 3
        expand: %{sql:SELECT count(username) FROM radcheck WHERE radcheck.username='%{request:User-Name}'} -> 7
    ? Evaluating ("%{sql:SELECT count(username) FROM radcheck WHERE radcheck.username='%{request:User-Name}'}" == 0) -> FALSE
    ++++? if ("%{sql:SELECT count(username) FROM radcheck WHERE radcheck.username='%{request:User-Name}'}" == 0) -> FALSE
    ++++? if ("%{sql:SELECT count(username) FROM radcheck WHERE radcheck.username='%{request:Calling-Station-Id}'}" != 0)
    sql_xlat
        expand: %{User-Name} -> fazevedo
    sql_set_user escaped user --> 'fazevedo'
        expand: SELECT count(username) FROM radcheck WHERE radcheck.username='%{request:Calling-Station-Id}' -> SELECT count(username) FROM radcheck WHERE radcheck.username='4c-b1-99-ac-f0-54'
    rlm_sql (sql): Reserving sql socket id: 2
    sql_xlat finished
    rlm_sql (sql): Released sql socket id: 2
        expand: %{sql:SELECT count(username) FROM radcheck WHERE radcheck.username='%{request:Calling-Station-Id}'} -> 0
    ? Evaluating ("%{sql:SELECT count(username) FROM radcheck WHERE radcheck.username='%{request:Calling-Station-Id}'}" != 0) -> FALSE
    ++++? if ("%{sql:SELECT count(username) FROM radcheck WHERE radcheck.username='%{request:Calling-Station-Id}'}" != 0) -> FALSE
    ++++? elsif ("%{sql:SELECT count(radcheck.username) FROM radcheck WHERE radcheck.username='%{request:User-Name}' and attribute='Rd-Mac-Check' and value=1}")
    sql_xlat
        expand: %{User-Name} -> fazevedo
    sql_set_user escaped user --> 'fazevedo'
        expand: SELECT count(radcheck.username) FROM radcheck WHERE radcheck.username='%{request:User-Name}' and attribute='Rd-Mac-Check' and value=1 -> SELECT count(radcheck.username) FROM radcheck WHERE radcheck.username='fazevedo' and attribute='Rd-Mac-Check' and value=1
    rlm_sql (sql): Reserving sql socket id: 1
    sql_xlat finished
    rlm_sql (sql): Released sql socket id: 1
        expand: %{sql:SELECT count(radcheck.username) FROM radcheck WHERE radcheck.username='%{request:User-Name}' and attribute='Rd-Mac-Check' and value=1} -> 0
    ? Evaluating ("%{sql:SELECT count(radcheck.username) FROM radcheck WHERE radcheck.username='%{request:User-Name}' and attribute='Rd-Mac-Check' and value=1}") -> FALSE
    ++++? elsif ("%{sql:SELECT count(radcheck.username) FROM radcheck WHERE radcheck.username='%{request:User-Name}' and attribute='Rd-Mac-Check' and value=1}") -> FALSE
    sql_xlat
        expand: %{User-Name} -> fazevedo
    sql_set_user escaped user --> 'fazevedo'
        expand: SELECT value FROM radcheck WHERE radcheck.username='%{request:User-Name}' and attribute='Rd-Device-Owner' -> SELECT value FROM radcheck WHERE radcheck.username='fazevedo' and attribute='Rd-Device-Owner'
    rlm_sql (sql): Reserving sql socket id: 0
    SQL query did not return any results
    rlm_sql (sql): Released sql socket id: 0
        expand: %{sql:SELECT value FROM radcheck WHERE radcheck.username='%{request:User-Name}' and attribute='Rd-Device-Owner'} -> 
    ++++[control] returns noop
    ++++? if ("%{control:Rd-Tmp-Owner}")
        expand: %{control:Rd-Tmp-Owner} -> 
    ? Evaluating ("%{control:Rd-Tmp-Owner}") -> FALSE
    ++++? if ("%{control:Rd-Tmp-Owner}") -> FALSE
    ++++- entering else else {...}
    +++++- entering policy RADIUSdesk_user_check {...}
    [sql]   expand: %{User-Name} -> fazevedo
    [sql] sql_set_user escaped user --> 'fazevedo'
    rlm_sql (sql): Reserving sql socket id: 4
    [sql]   expand: SELECT id, username, attribute, value, op           FROM radcheck           WHERE username = '%{SQL-User-Name}'           ORDER BY id -> SELECT id, username, attribute, value, op           FROM radcheck           WHERE username = 'fazevedo'           ORDER BY id
    [sql] User found in radcheck table
    [sql]   expand: SELECT id, username, attribute, value, op           FROM radreply           WHERE username = '%{SQL-User-Name}'           ORDER BY id -> SELECT id, username, attribute, value, op           FROM radreply           WHERE username = 'fazevedo'           ORDER BY id
    [sql]   expand: SELECT groupname           FROM radusergroup           WHERE username = '%{SQL-User-Name}'           ORDER BY priority -> SELECT groupname           FROM radusergroup           WHERE username = 'fazevedo'           ORDER BY priority
    [sql] Checking profile Time-Standard-1Hour
    [sql] sql_set_user escaped user --> 'Time-Standard-1Hour'
    [sql]   expand: SELECT groupname           FROM radusergroup           WHERE username = '%{SQL-User-Name}'           ORDER BY priority -> SELECT groupname           FROM radusergroup           WHERE username = 'Time-Standard-1Hour'           ORDER BY priority
    [sql]   expand: SELECT id, groupname, attribute,           Value, op           FROM radgroupcheck           WHERE groupname = '%{Sql-Group}'           ORDER BY id -> SELECT id, groupname, attribute,           Value, op           FROM radgroupcheck           WHERE groupname = '1Hour'           ORDER BY id
    [sql] User found in group 1Hour
    [sql]   expand: SELECT id, groupname, attribute,           value, op           FROM radgroupreply           WHERE groupname = '%{Sql-Group}'           ORDER BY id -> SELECT id, groupname, attribute,           value, op           FROM radgroupreply           WHERE groupname = '1Hour'           ORDER BY id
    [sql]   expand: SELECT id, groupname, attribute,           Value, op           FROM radgroupcheck           WHERE groupname = '%{Sql-Group}'           ORDER BY id -> SELECT id, groupname, attribute,           Value, op           FROM radgroupcheck           WHERE groupname = 'BW-384Kb'           ORDER BY id
    [sql] User found in group BW-384Kb
    [sql]   expand: SELECT id, groupname, attribute,           value, op           FROM radgroupreply           WHERE groupname = '%{Sql-Group}'           ORDER BY id -> SELECT id, groupname, attribute,           value, op           FROM radgroupreply           WHERE groupname = 'BW-384Kb'           ORDER BY id
    rlm_sql (sql): Released sql socket id: 4
    ++++++[sql] returns ok
    ++++++? if (ok)
    ? Evaluating (ok) -> TRUE
    ++++++? if (ok) -> TRUE
    ++++++- entering if (ok) {...}
    +++++++? if (("%{control:Rd-Account-Disabled}")&&("%{control:Rd-Account-Disabled}" == 1))
        expand: %{control:Rd-Account-Disabled} -> 0
    ?? Evaluating ("%{control:Rd-Account-Disabled}") -> FALSE
    ?? Skipping ("%{control:Rd-Account-Disabled}" == 1)
    +++++++? if (("%{control:Rd-Account-Disabled}")&&("%{control:Rd-Account-Disabled}" == 1)) -> FALSE
    +++++++? if ("%{control:Rd-Account-Activation-Time}")
        expand: %{control:Rd-Account-Activation-Time} -> 
    ? Evaluating ("%{control:Rd-Account-Activation-Time}") -> FALSE
    +++++++? if ("%{control:Rd-Account-Activation-Time}") -> FALSE
    +++++++? if ("%{control:Rd-Realm}")
        expand: %{control:Rd-Realm} -> TVCabo
    ? Evaluating ("%{control:Rd-Realm}") -> TRUE
    +++++++? if ("%{control:Rd-Realm}") -> TRUE
    +++++++- entering if ("%{control:Rd-Realm}") {...}
        expand: %{control:Rd-Realm} -> TVCabo
    ++++++++[request] returns ok
    +++++++- if ("%{control:Rd-Realm}") returns ok
    +++++++? if (("%{control:Rd-Auth-Type}")&&("%{control:Rd-Auth-Type}" != 'sql'))
        expand: %{control:Rd-Auth-Type} -> 
    ?? Evaluating ("%{control:Rd-Auth-Type}") -> FALSE
    ?? Skipping ("%{control:Rd-Auth-Type}" != 'sql')
    +++++++? if (("%{control:Rd-Auth-Type}")&&("%{control:Rd-Auth-Type}" != 'sql')) -> FALSE
    +++++++- entering policy RADIUSdesk_data_counter {...}
    ++++++++? if ((control:Rd-Total-Data)&&(control:Rd-Reset-Type-Data)&&(control:Rd-Cap-Type-Data == 'hard'))
    ?? Evaluating (control:Rd-Total-Data) -> FALSE
    ?? Skipping (control:Rd-Reset-Type-Data)
    ?? Skipping (control:Rd-Cap-Type-Data == 'hard')
    ++++++++? if ((control:Rd-Total-Data)&&(control:Rd-Reset-Type-Data)&&(control:Rd-Cap-Type-Data == 'hard')) -> FALSE
    +++++++- policy RADIUSdesk_data_counter returns ok
    +++++++- entering policy RADIUSdesk_time_counter {...}
    ++++++++? if ((control:Rd-Total-Time)&&(control:Rd-Reset-Type-Time)&&(control:Rd-Cap-Type-Time == 'hard'))
    ?? Evaluating (control:Rd-Total-Time) -> TRUE
    ?? Evaluating (control:Rd-Reset-Type-Time) -> TRUE
    ?? Evaluating (control:Rd-Cap-Type-Time == 'hard') -> TRUE
    ++++++++? if ((control:Rd-Total-Time)&&(control:Rd-Reset-Type-Time)&&(control:Rd-Cap-Type-Time == 'hard')) -> TRUE
    ++++++++- entering if ((control:Rd-Total-Time)&&(control:Rd-Reset-Type-Time)&&(control:Rd-Cap-Type-Time == 'hard')) {...}
    rlm_perl: Added pair NAS-Port-Type = Wireless-802.11
    rlm_perl: Added pair WISPr-Logoff-URL = http://10.123.255.254:3990/logoff
    rlm_perl: Added pair Acct-Session-Id = 5266433b00000004
    rlm_perl: Added pair Service-Type = Login-User
    rlm_perl: Added pair Called-Station-Id = AA-2A-CC-8D-F8-21
    rlm_perl: Added pair Message-Authenticator = 0xadf07847b34d724a49ca411064408b7e
    rlm_perl: Added pair Realm = TVCabo
    rlm_perl: Added pair NAS-IP-Address = 10.123.255.254
    rlm_perl: Added pair NAS-Port-Id = 00000004
    rlm_perl: Added pair ChilliSpot-Version = 1.3.0
    rlm_perl: Added pair Calling-Station-Id = 4c-b1-99-ac-f0-54
    rlm_perl: Added pair WISPr-Location-ID = isocc=,cc=,ac=,network=Coova,
    rlm_perl: Added pair User-Name = fazevedo
    rlm_perl: Added pair User-Password = \t\217\324\3240\202[\016B3\2267\330\327\rI
    rlm_perl: Added pair NAS-Identifier = CPortal
    rlm_perl: Added pair Framed-IP-Address = 10.123.0.16
    rlm_perl: Added pair NAS-Port = 4
    rlm_perl: Added pair WISPr-Location-Name = My_HotSpot
    rlm_perl: Added pair WISPr-Bandwidth-Max-Up = 384000
    rlm_perl: Added pair WISPr-Bandwidth-Max-Down = 384000
    rlm_perl: Added pair Cleartext-Password = password
    rlm_perl: Added pair Rd-Not-Track-Auth = 1
    rlm_perl: Added pair Rd-Realm = TVCabo
    rlm_perl: Added pair Rd-Reset-Type-Time = never
    rlm_perl: Added pair Rd-Total-Time = 3600
    rlm_perl: Added pair Rd-User-Type = user
    rlm_perl: Added pair User-Profile = Time-Standard-1Hour
    rlm_perl: Added pair Rd-Tmp-Owner = 
    rlm_perl: Added pair Rd-Cap-Type-Time = hard
    rlm_perl: Added pair Rd-Account-Disabled = 0
    +++++++++[pl_reset_time_for_time] returns noop
    +++++++++? if (updated)
    ? Evaluating (updated) -> FALSE
    +++++++++? if (updated) -> FALSE
    +++++++++- entering else else {...}
    ++++++++++? if ("%{control:Rd-Tmp-Avail-Time}")
        expand: %{control:Rd-Tmp-Avail-Time} -> 
    ? Evaluating ("%{control:Rd-Tmp-Avail-Time}") -> FALSE
    ++++++++++? if ("%{control:Rd-Tmp-Avail-Time}") -> FALSE
    ++++++++++- entering else else {...}
    sql_xlat
        expand: %{User-Name} -> fazevedo
    sql_set_user escaped user --> 'fazevedo'
        expand: SELECT IFNULL(SUM(AcctSessionTime),0) FROM radacct WHERE username='%{request:User-Name}' -> SELECT IFNULL(SUM(AcctSessionTime),0) FROM radacct WHERE username='fazevedo'
    rlm_sql (sql): Reserving sql socket id: 3
    sql_xlat finished
    rlm_sql (sql): Released sql socket id: 3
        expand: %{sql:SELECT IFNULL(SUM(AcctSessionTime),0) FROM radacct WHERE username='%{request:User-Name}'} -> 0
    +++++++++++[control] returns noop
    ++++++++++- else else returns noop
    +++++++++- else else returns noop
    rlm_perl: Rd-Tmp-Avail-Time does not exist. Set it equal to 3600
    rlm_perl: Added pair NAS-Port-Type = Wireless-802.11
    rlm_perl: Added pair Acct-Session-Id = 5266433b00000004
    rlm_perl: Added pair WISPr-Logoff-URL = http://10.123.255.254:3990/logoff
    rlm_perl: Added pair Service-Type = Login-User
    rlm_perl: Added pair Called-Station-Id = AA-2A-CC-8D-F8-21
    rlm_perl: Added pair Message-Authenticator = 0xadf07847b34d724a49ca411064408b7e
    rlm_perl: Added pair Realm = TVCabo
    rlm_perl: Added pair NAS-IP-Address = 10.123.255.254
    rlm_perl: Added pair NAS-Port-Id = 00000004
    rlm_perl: Added pair ChilliSpot-Version = 1.3.0
    rlm_perl: Added pair SQL-User-Name = fazevedo
    rlm_perl: Added pair Calling-Station-Id = 4c-b1-99-ac-f0-54
    rlm_perl: Added pair WISPr-Location-ID = isocc=,cc=,ac=,network=Coova,
    rlm_perl: Added pair User-Name = fazevedo
    rlm_perl: Added pair User-Password = \t\217\324\3240\202[\016B3\2267\330\327\rI
    rlm_perl: Added pair NAS-Identifier = CPortal
    rlm_perl: Added pair Framed-IP-Address = 10.123.0.16
    rlm_perl: Added pair NAS-Port = 4
    rlm_perl: Added pair WISPr-Location-Name = My_HotSpot
    rlm_perl: Added pair WISPr-Bandwidth-Max-Up = 384000
    rlm_perl: Added pair WISPr-Bandwidth-Max-Down = 384000
    rlm_perl: Added pair Rd-Avail-Time = 3600
    rlm_perl: Added pair Cleartext-Password = password
    rlm_perl: Added pair Rd-Realm = TVCabo
    rlm_perl: Added pair Rd-Not-Track-Auth = 1
    rlm_perl: Added pair Rd-User-Type = user
    rlm_perl: Added pair Rd-Total-Time = 3600
    rlm_perl: Added pair Rd-Reset-Type-Time = never
    rlm_perl: Added pair User-Profile = Time-Standard-1Hour
    rlm_perl: Added pair Rd-Tmp-Owner = 
    rlm_perl: Added pair Rd-Cap-Type-Time = hard
    rlm_perl: Added pair Rd-Account-Disabled = 0
    rlm_perl: Added pair Rd-Used-Time = 0
    rlm_perl: Added pair Rd-Tmp-Avail-Time = 3600
    +++++++++[pl_check_usage_time] returns updated
    ++++++++- if ((control:Rd-Total-Time)&&(control:Rd-Reset-Type-Time)&&(control:Rd-Cap-Type-Time == 'hard')) returns updated
    +++++++- policy RADIUSdesk_time_counter returns updated
    +++++++- entering policy RADIUSdesk_voucher_check {...}
    ++++++++? if ("%{control:Rd-Voucher}")
        expand: %{control:Rd-Voucher} -> 
    ? Evaluating ("%{control:Rd-Voucher}") -> FALSE
    ++++++++? if ("%{control:Rd-Voucher}") -> FALSE
    +++++++- policy RADIUSdesk_voucher_check returns updated
    +++++++- entering policy RADIUSdesk_realm_nas_check {...}
    ++++++++? if ("%{request:NAS-Identifier}")
        expand: %{request:NAS-Identifier} -> CPortal
    ? Evaluating ("%{request:NAS-Identifier}") -> TRUE
    ++++++++? if ("%{request:NAS-Identifier}") -> TRUE
    ++++++++- entering if ("%{request:NAS-Identifier}") {...}
    +++++++++? if ("%{sql:SELECT COUNT(na_realms.id) AS count FROM nas LEFT JOIN na_realms ON nas.id=na_realms.na_id WHERE nas.nasidentifier='%{request:NAS-Identifier}'}" > 0)
    sql_xlat
        expand: %{User-Name} -> fazevedo
    sql_set_user escaped user --> 'fazevedo'
        expand: SELECT COUNT(na_realms.id) AS count FROM nas LEFT JOIN na_realms ON nas.id=na_realms.na_id WHERE nas.nasidentifier='%{request:NAS-Identifier}' -> SELECT COUNT(na_realms.id) AS count FROM nas LEFT JOIN na_realms ON nas.id=na_realms.na_id WHERE nas.nasidentifier='CPortal'
    rlm_sql (sql): Reserving sql socket id: 2
    sql_xlat finished
    rlm_sql (sql): Released sql socket id: 2
        expand: %{sql:SELECT COUNT(na_realms.id) AS count FROM nas LEFT JOIN na_realms ON nas.id=na_realms.na_id WHERE nas.nasidentifier='%{request:NAS-Identifier}'} -> 0
    ? Evaluating ("%{sql:SELECT COUNT(na_realms.id) AS count FROM nas LEFT JOIN na_realms ON nas.id=na_realms.na_id WHERE nas.nasidentifier='%{request:NAS-Identifier}'}" > 0) -> FALSE
    +++++++++? if ("%{sql:SELECT COUNT(na_realms.id) AS count FROM nas LEFT JOIN na_realms ON nas.id=na_realms.na_id WHERE nas.nasidentifier='%{request:NAS-Identifier}'}" > 0) -> FALSE
    ++++++++- if ("%{request:NAS-Identifier}") returns updated
    ++++++++? if ("%{request:NAS-IP-Address}")
        expand: %{request:NAS-IP-Address} -> 10.123.255.254
    ? Evaluating ("%{request:NAS-IP-Address}") -> TRUE
    ++++++++? if ("%{request:NAS-IP-Address}") -> TRUE
    ++++++++- entering if ("%{request:NAS-IP-Address}") {...}
    +++++++++? if ("%{sql:SELECT COUNT(na_realms.id) AS count FROM nas LEFT JOIN na_realms ON nas.id=na_realms.na_id WHERE nas.nasname='%{request:NAS-IP-Address}'}" > 0)
    sql_xlat
        expand: %{User-Name} -> fazevedo
    sql_set_user escaped user --> 'fazevedo'
        expand: SELECT COUNT(na_realms.id) AS count FROM nas LEFT JOIN na_realms ON nas.id=na_realms.na_id WHERE nas.nasname='%{request:NAS-IP-Address}' -> SELECT COUNT(na_realms.id) AS count FROM nas LEFT JOIN na_realms ON nas.id=na_realms.na_id WHERE nas.nasname='10.123.255.254'
    rlm_sql (sql): Reserving sql socket id: 1
    sql_xlat finished
    rlm_sql (sql): Released sql socket id: 1
        expand: %{sql:SELECT COUNT(na_realms.id) AS count FROM nas LEFT JOIN na_realms ON nas.id=na_realms.na_id WHERE nas.nasname='%{request:NAS-IP-Address}'} -> 0
    ? Evaluating ("%{sql:SELECT COUNT(na_realms.id) AS count FROM nas LEFT JOIN na_realms ON nas.id=na_realms.na_id WHERE nas.nasname='%{request:NAS-IP-Address}'}" > 0) -> FALSE
    +++++++++? if ("%{sql:SELECT COUNT(na_realms.id) AS count FROM nas LEFT JOIN na_realms ON nas.id=na_realms.na_id WHERE nas.nasname='%{request:NAS-IP-Address}'}" > 0) -> FALSE
    ++++++++- if ("%{request:NAS-IP-Address}") returns updated
    +++++++- policy RADIUSdesk_realm_nas_check returns updated
    ++++++- if (ok) returns updated
    +++++- policy RADIUSdesk_user_check returns updated
    ++++- else else returns updated
    +++- policy RADIUSdesk_main returns updated
    ++- if (!EAP-Message) returns updated
    ++ ... skipping else for request 0: Preceding "if" was taken
    ++[files] returns noop
    ++[expiration] returns noop
    ++[logintime] returns noop
    ++- entering policy RADIUSdesk_session_timeout {...}
    +++? if ("%{reply:Session-Timeout}")
        expand: %{reply:Session-Timeout} -> 
    ? Evaluating ("%{reply:Session-Timeout}") -> FALSE
    +++? if ("%{reply:Session-Timeout}") -> FALSE
    +++- entering else else {...}
    ++++? if (("%{control:Rd-Avail-Time}")&&("%{control:Rd-Voucher-Timeout}"))
        expand: %{control:Rd-Avail-Time} -> 3600
    ?? Evaluating ("%{control:Rd-Avail-Time}") -> TRUE
        expand: %{control:Rd-Voucher-Timeout} -> 
    ?? Evaluating ("%{control:Rd-Voucher-Timeout}") -> FALSE
    ++++? if (("%{control:Rd-Avail-Time}")&&("%{control:Rd-Voucher-Timeout}")) -> FALSE
    ++++? elsif ("%{control:Rd-Avail-Time}")
        expand: %{control:Rd-Avail-Time} -> 3600
    ? Evaluating ("%{control:Rd-Avail-Time}") -> TRUE
    ++++? elsif ("%{control:Rd-Avail-Time}") -> TRUE
    ++++- entering elsif ("%{control:Rd-Avail-Time}") {...}
        expand: %{control:Rd-Avail-Time} -> 3600
    +++++[reply] returns noop
    ++++- elsif ("%{control:Rd-Avail-Time}") returns noop
    ++++ ... skipping elsif for request 0: Preceding "if" was taken
    +++- else else returns noop
    ++- policy RADIUSdesk_session_timeout returns noop
    ++? if (("%{control:Rd-User-Type}" =='device')&&(!"%{control:Auth-Type}"))
        expand: %{control:Rd-User-Type} -> user
    ?? Evaluating ("%{control:Rd-User-Type}" =='device') -> FALSE
    ?? Skipping ("%{control:Auth-Type}")
    ++? if (("%{control:Rd-User-Type}" =='device')&&(!"%{control:Auth-Type}")) -> FALSE
    ++[pap] returns updated
    Found Auth-Type = PAP
    # Executing group from file /usr/local/etc/raddb/sites-enabled/default
    +- entering group PAP {...}
    [pap] login attempt with password " ???0?[?B3?7?? I"
    [pap] Using clear text password "password"
    [pap] Passwords don't match
    ++[pap] returns reject
    Failed to authenticate the user.
    Using Post-Auth-Type REJECT
    # Executing group from file /usr/local/etc/raddb/sites-enabled/default
    +- entering group REJECT {...}
    [attr_filter.access_reject]     expand: %{User-Name} -> fazevedo
    attr_filter: Matched entry DEFAULT at line 11
    ++[attr_filter.access_reject] returns updated
    ++- entering policy RADIUSdesk_last_reject {...}
    +++? if (EAP-Message)
    ? Evaluating (EAP-Message) -> FALSE
    +++? if (EAP-Message) -> FALSE
    +++? if ("%{sql:SELECT count(username) FROM `users` where username='%{User-Name}'}" > 0)
    sql_xlat
        expand: %{User-Name} -> fazevedo
    sql_set_user escaped user --> 'fazevedo'
        expand: SELECT count(username) FROM `users` where username='%{User-Name}' -> SELECT count(username) FROM `users` where username='fazevedo'
    rlm_sql (sql): Reserving sql socket id: 0
    sql_xlat finished
    rlm_sql (sql): Released sql socket id: 0
        expand: %{sql:SELECT count(username) FROM `users` where username='%{User-Name}'} -> 1
    ? Evaluating ("%{sql:SELECT count(username) FROM `users` where username='%{User-Name}'}" > 0) -> TRUE
    +++? if ("%{sql:SELECT count(username) FROM `users` where username='%{User-Name}'}" > 0) -> TRUE
    +++- entering if ("%{sql:SELECT count(username) FROM `users` where username='%{User-Name}'}" > 0) {...}
    sql_xlat
        expand: %{User-Name} -> fazevedo
    sql_set_user escaped user --> 'fazevedo'
        expand: %{reply:Reply-Message} -> 
        ... expanding second conditional
        expand: UPDATE `users` SET last_reject_time=now(),last_reject_nas='%{NAS-IP-Address}',last_reject_message='%{%{reply:Reply-Message}:-N/A}' where username='%{User-Name}' -> UPDATE `users` SET last_reject_time=now(),last_reject_nas='10.123.255.254',last_reject_message='N/A' where username='fazevedo'
    rlm_sql (sql): Reserving sql socket id: 4
    rlm_sql (sql): Released sql socket id: 4
        expand: %{sql:UPDATE `users` SET last_reject_time=now(),last_reject_nas='%{NAS-IP-Address}',last_reject_message='%{%{reply:Reply-Message}:-N/A}' where username='%{User-Name}'} -> 1
    ++++[expand] returns updated
    +++- if ("%{sql:SELECT count(username) FROM `users` where username='%{User-Name}'}" > 0) returns updated
    +++? if ("%{sql:SELECT count(name) FROM `devices` where name='%{Calling-Station-Id}'}" > 0)
    sql_xlat
        expand: %{User-Name} -> fazevedo
    sql_set_user escaped user --> 'fazevedo'
        expand: SELECT count(name) FROM `devices` where name='%{Calling-Station-Id}' -> SELECT count(name) FROM `devices` where name='4c-b1-99-ac-f0-54'
    rlm_sql (sql): Reserving sql socket id: 3
    sql_xlat finished
    rlm_sql (sql): Released sql socket id: 3
        expand: %{sql:SELECT count(name) FROM `devices` where name='%{Calling-Station-Id}'} -> 0
    ? Evaluating ("%{sql:SELECT count(name) FROM `devices` where name='%{Calling-Station-Id}'}" > 0) -> FALSE
    +++? if ("%{sql:SELECT count(name) FROM `devices` where name='%{Calling-Station-Id}'}" > 0) -> FALSE
    +++? if ("%{sql:SELECT count(name) FROM `vouchers` where name='%{User-Name}'}" > 0)
    sql_xlat
        expand: %{User-Name} -> fazevedo
    sql_set_user escaped user --> 'fazevedo'
        expand: SELECT count(name) FROM `vouchers` where name='%{User-Name}' -> SELECT count(name) FROM `vouchers` where name='fazevedo'
    rlm_sql (sql): Reserving sql socket id: 2
    sql_xlat finished
    rlm_sql (sql): Released sql socket id: 2
        expand: %{sql:SELECT count(name) FROM `vouchers` where name='%{User-Name}'} -> 0
    ? Evaluating ("%{sql:SELECT count(name) FROM `vouchers` where name='%{User-Name}'}" > 0) -> FALSE
    +++? if ("%{sql:SELECT count(name) FROM `vouchers` where name='%{User-Name}'}" > 0) -> FALSE
    ++- policy RADIUSdesk_last_reject returns updated
    Delaying reject of request 0 for 1 seconds
    Going to the next request
    Waking up in 0.9 seconds.
    Sending delayed reject for request 0
    Sending Access-Reject of id 238 to 10.200.2.13 port 44226
    Waking up in 4.9 seconds.
    Cleaning up request 0 ID 238 with timestamp +81
    Ready to process requests.
    
    rad_recv: Access-Request packet from host 127.0.0.1 port 39140, id=206, length=48
        User-Name = "fazevedo"
        User-Password = "password"
    # Executing section authorize from file /usr/local/etc/raddb/sites-enabled/default
    +- entering group authorize {...}
    ++[preprocess] returns ok
    ++- entering policy rewrite.calling_station_id {...}
    +++? if ((Calling-Station-Id) && "%{Calling-Station-Id}" =~ /^%{config:policy.mac-addr}$/i)
    ?? Evaluating (Calling-Station-Id) -> FALSE
    ? Skipping ("%{Calling-Station-Id}" =~ /^%{config:policy.mac-addr}$/i)
    +++? if ((Calling-Station-Id) && "%{Calling-Station-Id}" =~ /^%{config:policy.mac-addr}$/i) -> FALSE
    +++- entering else else {...}
    ++++[noop] returns noop
    +++- else else returns noop
    ++- policy rewrite.calling_station_id returns noop
    ++[chap] returns noop
    ++[mschap] returns noop
    ++[digest] returns noop
    [suffix] No '@' in User-Name = "fazevedo", looking up realm NULL
    [suffix] No such realm "NULL"
    ++[suffix] returns noop
    ++? if (!EAP-Message)
    ? Evaluating !(EAP-Message) -> TRUE
    ++? if (!EAP-Message) -> TRUE
    ++- entering if (!EAP-Message) {...}
    +++- entering policy RADIUSdesk_main {...}
    ++++? if (request:User-Name =~ /([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})/i)
    ? Evaluating (request:User-Name =~ /([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})/i) -> FALSE
    ++++? if (request:User-Name =~ /([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})[-:]?([0-9a-f]{2})/i) -> FALSE
    ++++? if ("%{sql:SELECT count(username) FROM radcheck WHERE radcheck.username='%{request:User-Name}'}" == 0)
    sql_xlat
        expand: %{User-Name} -> fazevedo
    sql_set_user escaped user --> 'fazevedo'
        expand: SELECT count(username) FROM radcheck WHERE radcheck.username='%{request:User-Name}' -> SELECT count(username) FROM radcheck WHERE radcheck.username='fazevedo'
    rlm_sql (sql): Reserving sql socket id: 4
    sql_xlat finished
    rlm_sql (sql): Released sql socket id: 4
        expand: %{sql:SELECT count(username) FROM radcheck WHERE radcheck.username='%{request:User-Name}'} -> 7
    ? Evaluating ("%{sql:SELECT count(username) FROM radcheck WHERE radcheck.username='%{request:User-Name}'}" == 0) -> FALSE
    ++++? if ("%{sql:SELECT count(username) FROM radcheck WHERE radcheck.username='%{request:User-Name}'}" == 0) -> FALSE
    ++++? if ("%{sql:SELECT count(username) FROM radcheck WHERE radcheck.username='%{request:Calling-Station-Id}'}" != 0)
    sql_xlat
        expand: %{User-Name} -> fazevedo
    sql_set_user escaped user --> 'fazevedo'
        expand: SELECT count(username) FROM radcheck WHERE radcheck.username='%{request:Calling-Station-Id}' -> SELECT count(username) FROM radcheck WHERE radcheck.username=''
    rlm_sql (sql): Reserving sql socket id: 3
    sql_xlat finished
    rlm_sql (sql): Released sql socket id: 3
        expand: %{sql:SELECT count(username) FROM radcheck WHERE radcheck.username='%{request:Calling-Station-Id}'} -> 0
    ? Evaluating ("%{sql:SELECT count(username) FROM radcheck WHERE radcheck.username='%{request:Calling-Station-Id}'}" != 0) -> FALSE
    ++++? if ("%{sql:SELECT count(username) FROM radcheck WHERE radcheck.username='%{request:Calling-Station-Id}'}" != 0) -> FALSE
    ++++? elsif ("%{sql:SELECT count(radcheck.username) FROM radcheck WHERE radcheck.username='%{request:User-Name}' and attribute='Rd-Mac-Check' and value=1}")
    sql_xlat
        expand: %{User-Name} -> fazevedo
    sql_set_user escaped user --> 'fazevedo'
        expand: SELECT count(radcheck.username) FROM radcheck WHERE radcheck.username='%{request:User-Name}' and attribute='Rd-Mac-Check' and value=1 -> SELECT count(radcheck.username) FROM radcheck WHERE radcheck.username='fazevedo' and attribute='Rd-Mac-Check' and value=1
    rlm_sql (sql): Reserving sql socket id: 2
    sql_xlat finished
    rlm_sql (sql): Released sql socket id: 2
        expand: %{sql:SELECT count(radcheck.username) FROM radcheck WHERE radcheck.username='%{request:User-Name}' and attribute='Rd-Mac-Check' and value=1} -> 0
    ? Evaluating ("%{sql:SELECT count(radcheck.username) FROM radcheck WHERE radcheck.username='%{request:User-Name}' and attribute='Rd-Mac-Check' and value=1}") -> FALSE
    ++++? elsif ("%{sql:SELECT count(radcheck.username) FROM radcheck WHERE radcheck.username='%{request:User-Name}' and attribute='Rd-Mac-Check' and value=1}") -> FALSE
    sql_xlat
        expand: %{User-Name} -> fazevedo
    sql_set_user escaped user --> 'fazevedo'
        expand: SELECT value FROM radcheck WHERE radcheck.username='%{request:User-Name}' and attribute='Rd-Device-Owner' -> SELECT value FROM radcheck WHERE radcheck.username='fazevedo' and attribute='Rd-Device-Owner'
    rlm_sql (sql): Reserving sql socket id: 1
    SQL query did not return any results
    rlm_sql (sql): Released sql socket id: 1
        expand: %{sql:SELECT value FROM radcheck WHERE radcheck.username='%{request:User-Name}' and attribute='Rd-Device-Owner'} -> 
    ++++[control] returns noop
    ++++? if ("%{control:Rd-Tmp-Owner}")
        expand: %{control:Rd-Tmp-Owner} -> 
    ? Evaluating ("%{control:Rd-Tmp-Owner}") -> FALSE
    ++++? if ("%{control:Rd-Tmp-Owner}") -> FALSE
    ++++- entering else else {...}
    +++++- entering policy RADIUSdesk_user_check {...}
    [sql]   expand: %{User-Name} -> fazevedo
    [sql] sql_set_user escaped user --> 'fazevedo'
    rlm_sql (sql): Reserving sql socket id: 0
    [sql]   expand: SELECT id, username, attribute, value, op           FROM radcheck           WHERE username = '%{SQL-User-Name}'           ORDER BY id -> SELECT id, username, attribute, value, op           FROM radcheck           WHERE username = 'fazevedo'           ORDER BY id
    [sql] User found in radcheck table
    [sql]   expand: SELECT id, username, attribute, value, op           FROM radreply           WHERE username = '%{SQL-User-Name}'           ORDER BY id -> SELECT id, username, attribute, value, op           FROM radreply           WHERE username = 'fazevedo'           ORDER BY id
    [sql]   expand: SELECT groupname           FROM radusergroup           WHERE username = '%{SQL-User-Name}'           ORDER BY priority -> SELECT groupname           FROM radusergroup           WHERE username = 'fazevedo'           ORDER BY priority
    [sql] Checking profile Time-Standard-1Hour
    [sql] sql_set_user escaped user --> 'Time-Standard-1Hour'
    [sql]   expand: SELECT groupname           FROM radusergroup           WHERE username = '%{SQL-User-Name}'           ORDER BY priority -> SELECT groupname           FROM radusergroup           WHERE username = 'Time-Standard-1Hour'           ORDER BY priority
    [sql]   expand: SELECT id, groupname, attribute,           Value, op           FROM radgroupcheck           WHERE groupname = '%{Sql-Group}'           ORDER BY id -> SELECT id, groupname, attribute,           Value, op           FROM radgroupcheck           WHERE groupname = '1Hour'           ORDER BY id
    [sql] User found in group 1Hour
    [sql]   expand: SELECT id, groupname, attribute,           value, op           FROM radgroupreply           WHERE groupname = '%{Sql-Group}'           ORDER BY id -> SELECT id, groupname, attribute,           value, op           FROM radgroupreply           WHERE groupname = '1Hour'           ORDER BY id
    [sql]   expand: SELECT id, groupname, attribute,           Value, op           FROM radgroupcheck           WHERE groupname = '%{Sql-Group}'           ORDER BY id -> SELECT id, groupname, attribute,           Value, op           FROM radgroupcheck           WHERE groupname = 'BW-384Kb'           ORDER BY id
    [sql] User found in group BW-384Kb
    [sql]   expand: SELECT id, groupname, attribute,           value, op           FROM radgroupreply           WHERE groupname = '%{Sql-Group}'           ORDER BY id -> SELECT id, groupname, attribute,           value, op           FROM radgroupreply           WHERE groupname = 'BW-384Kb'           ORDER BY id
    rlm_sql (sql): Released sql socket id: 0
    ++++++[sql] returns ok
    ++++++? if (ok)
    ? Evaluating (ok) -> TRUE
    ++++++? if (ok) -> TRUE
    ++++++- entering if (ok) {...}
    +++++++? if (("%{control:Rd-Account-Disabled}")&&("%{control:Rd-Account-Disabled}" == 1))
        expand: %{control:Rd-Account-Disabled} -> 0
    ?? Evaluating ("%{control:Rd-Account-Disabled}") -> FALSE
    ?? Skipping ("%{control:Rd-Account-Disabled}" == 1)
    +++++++? if (("%{control:Rd-Account-Disabled}")&&("%{control:Rd-Account-Disabled}" == 1)) -> FALSE
    +++++++? if ("%{control:Rd-Account-Activation-Time}")
        expand: %{control:Rd-Account-Activation-Time} -> 
    ? Evaluating ("%{control:Rd-Account-Activation-Time}") -> FALSE
    +++++++? if ("%{control:Rd-Account-Activation-Time}") -> FALSE
    +++++++? if ("%{control:Rd-Realm}")
        expand: %{control:Rd-Realm} -> TVCabo
    ? Evaluating ("%{control:Rd-Realm}") -> TRUE
    +++++++? if ("%{control:Rd-Realm}") -> TRUE
    +++++++- entering if ("%{control:Rd-Realm}") {...}
        expand: %{control:Rd-Realm} -> TVCabo
    ++++++++[request] returns ok
    +++++++- if ("%{control:Rd-Realm}") returns ok
    +++++++? if (("%{control:Rd-Auth-Type}")&&("%{control:Rd-Auth-Type}" != 'sql'))
        expand: %{control:Rd-Auth-Type} -> 
    ?? Evaluating ("%{control:Rd-Auth-Type}") -> FALSE
    ?? Skipping ("%{control:Rd-Auth-Type}" != 'sql')
    +++++++? if (("%{control:Rd-Auth-Type}")&&("%{control:Rd-Auth-Type}" != 'sql')) -> FALSE
    +++++++- entering policy RADIUSdesk_data_counter {...}
    ++++++++? if ((control:Rd-Total-Data)&&(control:Rd-Reset-Type-Data)&&(control:Rd-Cap-Type-Data == 'hard'))
    ?? Evaluating (control:Rd-Total-Data) -> FALSE
    ?? Skipping (control:Rd-Reset-Type-Data)
    ?? Skipping (control:Rd-Cap-Type-Data == 'hard')
    ++++++++? if ((control:Rd-Total-Data)&&(control:Rd-Reset-Type-Data)&&(control:Rd-Cap-Type-Data == 'hard')) -> FALSE
    +++++++- policy RADIUSdesk_data_counter returns ok
    +++++++- entering policy RADIUSdesk_time_counter {...}
    ++++++++? if ((control:Rd-Total-Time)&&(control:Rd-Reset-Type-Time)&&(control:Rd-Cap-Type-Time == 'hard'))
    ?? Evaluating (control:Rd-Total-Time) -> TRUE
    ?? Evaluating (control:Rd-Reset-Type-Time) -> TRUE
    ?? Evaluating (control:Rd-Cap-Type-Time == 'hard') -> TRUE
    ++++++++? if ((control:Rd-Total-Time)&&(control:Rd-Reset-Type-Time)&&(control:Rd-Cap-Type-Time == 'hard')) -> TRUE
    ++++++++- entering if ((control:Rd-Total-Time)&&(control:Rd-Reset-Type-Time)&&(control:Rd-Cap-Type-Time == 'hard')) {...}
    rlm_perl: Added pair User-Name = fazevedo
    rlm_perl: Added pair User-Password = password
    rlm_perl: Added pair Realm = TVCabo
    rlm_perl: Added pair NAS-IP-Address = 127.0.0.1
    rlm_perl: Added pair WISPr-Bandwidth-Max-Up = 384000
    rlm_perl: Added pair WISPr-Bandwidth-Max-Down = 384000
    rlm_perl: Added pair Cleartext-Password = password
    rlm_perl: Added pair Rd-Not-Track-Auth = 1
    rlm_perl: Added pair Rd-Realm = TVCabo
    rlm_perl: Added pair Rd-Reset-Type-Time = never
    rlm_perl: Added pair Rd-Total-Time = 3600
    rlm_perl: Added pair Rd-User-Type = user
    rlm_perl: Added pair User-Profile = Time-Standard-1Hour
    rlm_perl: Added pair Rd-Tmp-Owner = 
    rlm_perl: Added pair Rd-Cap-Type-Time = hard
    rlm_perl: Added pair Rd-Account-Disabled = 0
    +++++++++[pl_reset_time_for_time] returns noop
    +++++++++? if (updated)
    ? Evaluating (updated) -> FALSE
    +++++++++? if (updated) -> FALSE
    +++++++++- entering else else {...}
    ++++++++++? if ("%{control:Rd-Tmp-Avail-Time}")
        expand: %{control:Rd-Tmp-Avail-Time} -> 
    ? Evaluating ("%{control:Rd-Tmp-Avail-Time}") -> FALSE
    ++++++++++? if ("%{control:Rd-Tmp-Avail-Time}") -> FALSE
    ++++++++++- entering else else {...}
    sql_xlat
        expand: %{User-Name} -> fazevedo
    sql_set_user escaped user --> 'fazevedo'
        expand: SELECT IFNULL(SUM(AcctSessionTime),0) FROM radacct WHERE username='%{request:User-Name}' -> SELECT IFNULL(SUM(AcctSessionTime),0) FROM radacct WHERE username='fazevedo'
    rlm_sql (sql): Reserving sql socket id: 4
    sql_xlat finished
    rlm_sql (sql): Released sql socket id: 4
        expand: %{sql:SELECT IFNULL(SUM(AcctSessionTime),0) FROM radacct WHERE username='%{request:User-Name}'} -> 0
    +++++++++++[control] returns noop
    ++++++++++- else else returns noop
    +++++++++- else else returns noop
    rlm_perl: Rd-Tmp-Avail-Time does not exist. Set it equal to 3600
    rlm_perl: Added pair User-Name = fazevedo
    rlm_perl: Added pair User-Password = password
    rlm_perl: Added pair SQL-User-Name = fazevedo
    rlm_perl: Added pair Realm = TVCabo
    rlm_perl: Added pair NAS-IP-Address = 127.0.0.1
    rlm_perl: Added pair WISPr-Bandwidth-Max-Up = 384000
    rlm_perl: Added pair WISPr-Bandwidth-Max-Down = 384000
    rlm_perl: Added pair Rd-Avail-Time = 3600
    rlm_perl: Added pair Cleartext-Password = password
    rlm_perl: Added pair Rd-Realm = TVCabo
    rlm_perl: Added pair Rd-Not-Track-Auth = 1
    rlm_perl: Added pair Rd-User-Type = user
    rlm_perl: Added pair Rd-Total-Time = 3600
    rlm_perl: Added pair Rd-Reset-Type-Time = never
    rlm_perl: Added pair User-Profile = Time-Standard-1Hour
    rlm_perl: Added pair Rd-Tmp-Owner = 
    rlm_perl: Added pair Rd-Cap-Type-Time = hard
    rlm_perl: Added pair Rd-Account-Disabled = 0
    rlm_perl: Added pair Rd-Used-Time = 0
    rlm_perl: Added pair Rd-Tmp-Avail-Time = 3600
    +++++++++[pl_check_usage_time] returns updated
    ++++++++- if ((control:Rd-Total-Time)&&(control:Rd-Reset-Type-Time)&&(control:Rd-Cap-Type-Time == 'hard')) returns updated
    +++++++- policy RADIUSdesk_time_counter returns updated
    +++++++- entering policy RADIUSdesk_voucher_check {...}
    ++++++++? if ("%{control:Rd-Voucher}")
        expand: %{control:Rd-Voucher} -> 
    ? Evaluating ("%{control:Rd-Voucher}") -> FALSE
    ++++++++? if ("%{control:Rd-Voucher}") -> FALSE
    +++++++- policy RADIUSdesk_voucher_check returns updated
    +++++++- entering policy RADIUSdesk_realm_nas_check {...}
    ++++++++? if ("%{request:NAS-Identifier}")
        expand: %{request:NAS-Identifier} -> 
    ? Evaluating ("%{request:NAS-Identifier}") -> FALSE
    ++++++++? if ("%{request:NAS-Identifier}") -> FALSE
    ++++++++? if ("%{request:NAS-IP-Address}")
        expand: %{request:NAS-IP-Address} -> 127.0.0.1
    ? Evaluating ("%{request:NAS-IP-Address}") -> TRUE
    ++++++++? if ("%{request:NAS-IP-Address}") -> TRUE
    ++++++++- entering if ("%{request:NAS-IP-Address}") {...}
    +++++++++? if ("%{sql:SELECT COUNT(na_realms.id) AS count FROM nas LEFT JOIN na_realms ON nas.id=na_realms.na_id WHERE nas.nasname='%{request:NAS-IP-Address}'}" > 0)
    sql_xlat
        expand: %{User-Name} -> fazevedo
    sql_set_user escaped user --> 'fazevedo'
        expand: SELECT COUNT(na_realms.id) AS count FROM nas LEFT JOIN na_realms ON nas.id=na_realms.na_id WHERE nas.nasname='%{request:NAS-IP-Address}' -> SELECT COUNT(na_realms.id) AS count FROM nas LEFT JOIN na_realms ON nas.id=na_realms.na_id WHERE nas.nasname='127.0.0.1'
    rlm_sql (sql): Reserving sql socket id: 3
    sql_xlat finished
    rlm_sql (sql): Released sql socket id: 3
        expand: %{sql:SELECT COUNT(na_realms.id) AS count FROM nas LEFT JOIN na_realms ON nas.id=na_realms.na_id WHERE nas.nasname='%{request:NAS-IP-Address}'} -> 0
    ? Evaluating ("%{sql:SELECT COUNT(na_realms.id) AS count FROM nas LEFT JOIN na_realms ON nas.id=na_realms.na_id WHERE nas.nasname='%{request:NAS-IP-Address}'}" > 0) -> FALSE
    +++++++++? if ("%{sql:SELECT COUNT(na_realms.id) AS count FROM nas LEFT JOIN na_realms ON nas.id=na_realms.na_id WHERE nas.nasname='%{request:NAS-IP-Address}'}" > 0) -> FALSE
    ++++++++- if ("%{request:NAS-IP-Address}") returns updated
    +++++++- policy RADIUSdesk_realm_nas_check returns updated
    ++++++- if (ok) returns updated
    +++++- policy RADIUSdesk_user_check returns updated
    ++++- else else returns updated
    +++- policy RADIUSdesk_main returns updated
    ++- if (!EAP-Message) returns updated
    ++ ... skipping else for request 2: Preceding "if" was taken
    ++[files] returns noop
    ++[expiration] returns noop
    ++[logintime] returns noop
    ++- entering policy RADIUSdesk_session_timeout {...}
    +++? if ("%{reply:Session-Timeout}")
        expand: %{reply:Session-Timeout} -> 
    ? Evaluating ("%{reply:Session-Timeout}") -> FALSE
    +++? if ("%{reply:Session-Timeout}") -> FALSE
    +++- entering else else {...}
    ++++? if (("%{control:Rd-Avail-Time}")&&("%{control:Rd-Voucher-Timeout}"))
        expand: %{control:Rd-Avail-Time} -> 3600
    ?? Evaluating ("%{control:Rd-Avail-Time}") -> TRUE
        expand: %{control:Rd-Voucher-Timeout} -> 
    ?? Evaluating ("%{control:Rd-Voucher-Timeout}") -> FALSE
    ++++? if (("%{control:Rd-Avail-Time}")&&("%{control:Rd-Voucher-Timeout}")) -> FALSE
    ++++? elsif ("%{control:Rd-Avail-Time}")
        expand: %{control:Rd-Avail-Time} -> 3600
    ? Evaluating ("%{control:Rd-Avail-Time}") -> TRUE
    ++++? elsif ("%{control:Rd-Avail-Time}") -> TRUE
    ++++- entering elsif ("%{control:Rd-Avail-Time}") {...}
        expand: %{control:Rd-Avail-Time} -> 3600
    +++++[reply] returns noop
    ++++- elsif ("%{control:Rd-Avail-Time}") returns noop
    ++++ ... skipping elsif for request 2: Preceding "if" was taken
    +++- else else returns noop
    ++- policy RADIUSdesk_session_timeout returns noop
    ++? if (("%{control:Rd-User-Type}" =='device')&&(!"%{control:Auth-Type}"))
        expand: %{control:Rd-User-Type} -> user
    ?? Evaluating ("%{control:Rd-User-Type}" =='device') -> FALSE
    ?? Skipping ("%{control:Auth-Type}")
    ++? if (("%{control:Rd-User-Type}" =='device')&&(!"%{control:Auth-Type}")) -> FALSE
    ++[pap] returns updated
    Found Auth-Type = PAP
    # Executing group from file /usr/local/etc/raddb/sites-enabled/default
    +- entering group PAP {...}
    [pap] login attempt with password "password"
    [pap] Using clear text password "password"
    [pap] User authenticated successfully
    ++[pap] returns ok
    # Executing section post-auth from file /usr/local/etc/raddb/sites-enabled/default
    +- entering group post-auth {...}
    ++- entering policy RADIUSdesk_last_accept {...}
    +++? if ("%{sql:SELECT count(username) FROM `users` where username='%{User-Name}'}" > 0)
    sql_xlat
        expand: %{User-Name} -> fazevedo
    sql_set_user escaped user --> 'fazevedo'
        expand: SELECT count(username) FROM `users` where username='%{User-Name}' -> SELECT count(username) FROM `users` where username='fazevedo'
    rlm_sql (sql): Reserving sql socket id: 2
    sql_xlat finished
    rlm_sql (sql): Released sql socket id: 2
        expand: %{sql:SELECT count(username) FROM `users` where username='%{User-Name}'} -> 1
    ? Evaluating ("%{sql:SELECT count(username) FROM `users` where username='%{User-Name}'}" > 0) -> TRUE
    +++? if ("%{sql:SELECT count(username) FROM `users` where username='%{User-Name}'}" > 0) -> TRUE
    +++- entering if ("%{sql:SELECT count(username) FROM `users` where username='%{User-Name}'}" > 0) {...}
    sql_xlat
        expand: %{User-Name} -> fazevedo
    sql_set_user escaped user --> 'fazevedo'
        expand: UPDATE `users` SET last_accept_time=now(),last_accept_nas='%{NAS-IP-Address}' where username='%{User-Name}' -> UPDATE `users` SET last_accept_time=now(),last_accept_nas='127.0.0.1' where username='fazevedo'
    rlm_sql (sql): Reserving sql socket id: 1
    rlm_sql (sql): Released sql socket id: 1
        expand: %{sql:UPDATE `users` SET last_accept_time=now(),last_accept_nas='%{NAS-IP-Address}' where username='%{User-Name}'} -> 1
    ++++[expand] returns noop
    +++- if ("%{sql:SELECT count(username) FROM `users` where username='%{User-Name}'}" > 0) returns noop
    +++? if ("%{sql:SELECT count(name) FROM `devices` where name='%{Calling-Station-Id}'}" > 0)
    sql_xlat
        expand: %{User-Name} -> fazevedo
    sql_set_user escaped user --> 'fazevedo'
        expand: SELECT count(name) FROM `devices` where name='%{Calling-Station-Id}' -> SELECT count(name) FROM `devices` where name=''
    rlm_sql (sql): Reserving sql socket id: 0
    sql_xlat finished
    rlm_sql (sql): Released sql socket id: 0
        expand: %{sql:SELECT count(name) FROM `devices` where name='%{Calling-Station-Id}'} -> 0
    ? Evaluating ("%{sql:SELECT count(name) FROM `devices` where name='%{Calling-Station-Id}'}" > 0) -> FALSE
    +++? if ("%{sql:SELECT count(name) FROM `devices` where name='%{Calling-Station-Id}'}" > 0) -> FALSE
    +++? if ("%{sql:SELECT count(name) FROM `vouchers` where name='%{User-Name}'}" > 0)
    sql_xlat
        expand: %{User-Name} -> fazevedo
    sql_set_user escaped user --> 'fazevedo'
        expand: SELECT count(name) FROM `vouchers` where name='%{User-Name}' -> SELECT count(name) FROM `vouchers` where name='fazevedo'
    rlm_sql (sql): Reserving sql socket id: 4
    sql_xlat finished
    rlm_sql (sql): Released sql socket id: 4
        expand: %{sql:SELECT count(name) FROM `vouchers` where name='%{User-Name}'} -> 0
    ? Evaluating ("%{sql:SELECT count(name) FROM `vouchers` where name='%{User-Name}'}" > 0) -> FALSE
    +++? if ("%{sql:SELECT count(name) FROM `vouchers` where name='%{User-Name}'}" > 0) -> FALSE
    ++- policy RADIUSdesk_last_accept returns noop
    ++- entering policy RADIUSdesk_post_auth {...}
    +++? if (EAP-Message)
    ? Evaluating (EAP-Message) -> FALSE
    +++? if (EAP-Message) -> FALSE
    +++? if ((!"%{control:Rd-Not-Track-Auth}")||("%{control:Rd-Not-Track-Auth}" != 1))
        expand: %{control:Rd-Not-Track-Auth} -> 1
    ?? Evaluating !("%{control:Rd-Not-Track-Auth}") -> FALSE
        expand: %{control:Rd-Not-Track-Auth} -> 1
    ?? Evaluating ("%{control:Rd-Not-Track-Auth}" != 1) -> FALSE
    +++? if ((!"%{control:Rd-Not-Track-Auth}")||("%{control:Rd-Not-Track-Auth}" != 1)) -> FALSE
    ++- policy RADIUSdesk_post_auth returns noop
    ++- entering policy RADIUSdesk_auto_devices_check {...}
    +++? if (("%{request:User-Name}")&&("%{request:Calling-Station-Id}"))
        expand: %{request:User-Name} -> fazevedo
    ?? Evaluating ("%{request:User-Name}") -> TRUE
        expand: %{request:Calling-Station-Id} -> 
    ?? Evaluating ("%{request:Calling-Station-Id}") -> FALSE
    +++? if (("%{request:User-Name}")&&("%{request:Calling-Station-Id}")) -> FALSE
    ++- policy RADIUSdesk_auto_devices_check returns noop
    ++[exec] returns noop
    Sending Access-Accept of id 206 to 127.0.0.1 port 39140
        WISPr-Bandwidth-Max-Up = 384000
        WISPr-Bandwidth-Max-Down = 384000
        Session-Timeout = 3600
    Finished request 2.
    Going to the next request
    Waking up in 4.9 seconds.
    Cleaning up request 2 ID 206 with timestamp +807
    Ready to process requests.
    
     

    Last edit: Fernando Azevedo 2013-10-22
  • Fernando Azevedo

    Hi Dirk,

    While fighting against this odd issue, I have a simple question to try and understand what is going on:
    When working with ChilliSpot (prior to CoovaChilli) there used to be a parameter 'UAMSECRET' used in the https authentication process. Is that the same for the 'HS_UAMSECRET' that is used now? Where is this parameter configured on the RADIUSDesk side?

    Cheers,
    Fernando

     
  • Dirk van der Walt

    Hi Fernando,

    Late reply; I'm catching up today. The UAMSECRET and HS_UAMSECRET is the same, yes.

    This has to be the same as the one specified in /var/www/rd_login_pages/services/uam.php (if you run Apache) or /usr/share/nginx/www/rd_login_pages/services/uam.php if you run Nginx.

    Regards

     
  • Dirk van der Walt

    Hi Fernando,

    Did you modify yhe HS_UAMSECRET? then be use it also is the same in the uam.php file. I suppose that's the problem.

    Regards

     
  • Fernando Azevedo

    Hi Dirk,

    I've followed all that and nothing... :-(

    Afterwards, the machine just started with some weird sudo errors and I decided to just drop it and build a new one from scratch and everything went just fine. It turned out to be a Ubuntu related issue and the machine was just messed up.

    Thanks,
    Fernando

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.