rlm_sql_mysql: Mysql check_error: 1064 received

여친급구 jinjusi at yahoo.co.kr
Sun Apr 20 10:40:10 CEST 2008


Hello all
freeradius-server-2.0.3.tar.gz
rpmbuild -bb freeradius.spec
        --with-mysql-lib-dir=/usr/lib/mysql \
        --with-mysql-include-dir=/usr/include/mysql \

accounting {
       sqlippool
}
post-auth {
       sqlippool
}
user file
   
     DEFAULT Pool-Name := dialup_pool1
     Fall-Through = Yes

INSERT INTO radgroupcheck (GroupName, Attribute, op, Value) 
values("dialup_pool1", "Pool-Name", ":=", "dialup_pool1");

INSERT INTO radippool (pool_name, framedipaddress) VALUES ('dialup_pool1', 
'192.168.0.1');

radiusd -X

..
..
rlm_sql_mysql: MYSQL check_error: 1064 received
sqlippool_command: database query error in: 'UPDATE radippool   SET nasipaddress = '', pool_key = 0,   callingstationid = '', username = '',   expiry_time IS NULL   WHERE expiry_time <= NOW() - INTERVAL 1 SECOND'

..
..
rlm_sql_mysql: MYSQL check_error: 1064 received
sqlippool_command: database query error in: 'UPDATE radippool  SET nasipaddress = '', pool_key = 0, callingstationid = '', username = '',  expiry_time IS NULL  WHERE nasipaddress = '127.0.0.1' AND pool_key = '0'  AND username = 'test'  AND callingstationid = '123.123.123.138'  AND framedipaddress = '200.200.200.173''
..
..

--------------------------------------------------------------------------------------------------------------
Module: Instantiating sqlippool
  sqlippool {
        sql-instance-name = "sql"
        lease-duration = 3600
        pool-name = ""
        allocate-begin = "START TRANSACTION"
        allocate-clear = "UPDATE radippool   SET nasipaddress = '', pool_key = 0,   callingstationid = '', username = '',   expiry_time IS NULL   WHERE expiry_time < = NOW() - INTERVAL 1 SECOND"
        allocate-find = "SELECT framedipaddress FROM radippool   WHERE pool_name = '%{control:Pool-Name}'   AND expiry_time IS NULL   ORDER BY RAND()   LIMIT 1   FOR UPDATE"
        allocate-update = "UPDATE radippool  SET nasipaddress = '%{NAS-IP-Address}', pool_key = '%{NAS-Port}',  callingstationid = '%{Calling-Station-Id}', username = '%{User-Name}',  expiry_time = NOW() + INTERVAL 3600 SECOND  WHERE framedipaddress = '%I'"
        allocate-commit = "COMMIT"
        allocate-rollback = "ROLLBACK"
        pool-check = "SELECT id FROM radippool  WHERE pool_name='%{control:Pool-Name}' LIMIT 1"
        start-begin = "START TRANSACTION"
        start-update = "UPDATE radippool  SET expiry_time = NOW() + INTERVAL 3600 SECOND  WHERE nasipaddress = '%{NAS-IP-Address}' AND  pool_key = '%{NAS-Port}'"
        start-commit = "COMMIT"
        start-rollback = "ROLLBACK"
        alive-begin = "START TRANSACTION"
        alive-update = "UPDATE radippool  SET expiry_time = NOW() + INTERVAL 3600 SECOND  WHERE nasipaddress = '%{Nas-IP-Address}' AND pool_key = '%{NAS-Port}'  AND username = '%{User-Name}'  AND callingstationid = '%{Calling-Station-Id}'  AND framedipaddress = '%{Framed-IP-Address}'"
        alive-commit = "COMMIT"
        alive-rollback = "ROLLBACK"
        stop-begin = "START TRANSACTION"
        stop-clear = "UPDATE radippool  SET nasipaddress = '', pool_key = 0, callingstationid = '', username = '',  expiry_time IS NULL  WHERE nasipaddress = '%{Nas-IP-Address}' AND pool_key = '%{NAS-Port}'  AND username = '%{User-Name}'  AND callingstationid = '%{Calling-Station-Id}'  AND framedipaddress = '%{Framed-IP-Address}'"
        stop-commit = "COMMIT"
        stop-rollback = "ROLLBACK"
        on-begin = "START TRANSACTION"
        on-clear = "UPDATE radippool  SET nasipaddress = '', pool_key = 0, callingstationid = '', username = '',  expiry_time IS NULL  WHERE nasipaddress = '%{Nas-IP-Address}'"
        on-commit = "COMMIT"
        on-rollback = "ROLLBACK"
        off-begin = "START TRANSACTION"
        off-clear = "UPDATE radippool  SET nasipaddress = '', pool_key = 0, callingstationid = '', username = '',  expiry_time IS NULL  WHERE nasipaddress = '%{Nas-IP-Address}'"
        off-commit = "COMMIT"
        off-rollback = "ROLLBACK"
        sqlippool_log_exists = "Existing IP: %{reply:Framed-IP-Address}   (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} user %{User-Name})"
        sqlippool_log_success = "Allocated IP: %{reply:Framed-IP-Address} from %{control:Pool-Name}   (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} user %{User-Name})"
        sqlippool_log_clear = "Released IP %{Framed-IP-Address} (did %{Called-Station-Id} cli %{Calling-Station-Id} user %{User-Name})"
        sqlippool_log_failed = "IP Allocation FAILED from %{control:Pool-Name}   (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} user %{User-Name})"
        sqlippool_log_nopool = "No Pool-Name defined   (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} user %{User-Name})"
        defaultpool = "main_pool"
  }



      ________________________________________________________ 
180도 달라진 야후! 메일 - 알아서 척척! 새로운 야후! 메일은 10분에 한번 스스로 새 메시지를 받아온답니다.
http://kr.content.mail.yahoo.com/cgland




More information about the Freeradius-Users mailing list