Freeradius acct_unique模块包在OpenWrt CC-15.05.1上不可用

时间:2017-06-20 08:52:28

标签: embedded cross-compiling openwrt freeradius linksys

我在我的linksys WRT1900AC V1(mamba - mvebu平台)上运行Openwrt CHAOS CALMER(15.05.1,r48532)。

我已经安装了freeradius服务器版本2.2.8,我遇到麻烦的acct唯一会话ID,这一直是空的:

rlm_sql_mysql: MYSQL check_error: 1062 received
[sql] Couldn't insert SQL accounting STOP record - Duplicate entry '' for 
key 'acctuniqueid'
rlm_sql_mysql: MYSQL check_error: 1062 received
rlm_sql_mysql: Cannot store result
rlm_sql_mysql: MySQL error 'Duplicate entry '' for key 'acctuniqueid''
rlm_sql (sql): Released sql socket id: 9
++[sql] = fail
+} # group accounting = fail
Finished request 21.
Cleaning up request 21 ID 5 with timestamp +1271
Going to the next request
Ready to process requests.

阅读freeradius邮件列表似乎唯一的解决方案是使用“acct_unique”模块,该模块无法使用OpenWrt控制台的opkg安装工具下载。 我求任何有这个软件包的人(ipk已经为mvebu平台编译)或者他有OpenWrt构建系统,他可以交叉编译这个模块,帮助我通过帮助我为我的平台获得这个模块来解决我的问题。

欢迎使用来自freeradius守护程序的shell脚本调用来解决此问题的任何其他替代解决方案。

以下是freeradius可用的软件包列表:

root@OpenWrt:~# opkg find '*freeradius*' freeradius2 - 2.2.8-2 - A flexible RADIUS server (version 2) freeradius2-common - 2.2.8-2 - common files freeradius2-democerts - 2.2.8-2 - Demo certificates to test the server freeradius2-mod-always - 2.2.8-2 - Always module freeradius2-mod-attr-filter - 2.2.8-2 - ATTR filter module freeradius2-mod-attr-rewrite - 2.2.8-2 - ATTR rewrite module freeradius2-mod-chap - 2.2.8-2 - CHAP module freeradius2-mod-detail - 2.2.8-2 - Detailed accounting module freeradius2-mod-eap - 2.2.8-2 - Base EAP module freeradius2-mod-eap-gtc - 2.2.8-2 - EAP/GTC module freeradius2-mod-eap-md5 - 2.2.8-2 - EAP/MD5 module freeradius2-mod-eap-mschapv2 - 2.2.8-2 - EAP/MS-CHAPv2 module freeradius2-mod-eap-peap - 2.2.8-2 - EAP/PEAP module freeradius2-mod-eap-tls - 2.2.8-2 - EAP/TLS module freeradius2-mod-eap-ttls - 2.2.8-2 - EAP/TTLS module freeradius2-mod-exec - 2.2.8-2 - EXEC module freeradius2-mod-expiration - 2.2.8-2 - Expiration module freeradius2-mod-expr - 2.2.8-2 - EXPR module freeradius2-mod-files - 2.2.8-2 - Module using local files for authorization freeradius2-mod-ldap - 2.2.8-2 - LDAP module freeradius2-mod-logintime - 2.2.8-2 - Logintime module freeradius2-mod-mschap - 2.2.8-2 - MS-CHAP and MS-CHAPv2 module freeradius2-mod-pap - 2.2.8-2 - PAP module freeradius2-mod-passwd - 2.2.8-2 - Rlm passwd module freeradius2-mod-preprocess - 2.2.8-2 - Request pre-processing module freeradius2-mod-radutmp - 2.2.8-2 - Radius UTMP module freeradius2-mod-realm - 2.2.8-2 - Realms handling module freeradius2-mod-sql - 2.2.8-2 - Base SQL module freeradius2-mod-sql-mysql - 2.2.8-2 - MySQL module freeradius2-mod-sql-pgsql - 2.2.8-2 - PostgreSQL module freeradius2-mod-sql-sqlite - 2.2.8-2 - SQLite module freeradius2-mod-sqlcounter - 2.2.8-2 - Generic SQL Counter module freeradius2-mod-sqllog - 2.2.8-2 - SQL Logging module freeradius2-utils - 2.2.8-2 - Misc. client utilities

亲切的问候

1 个答案:

答案 0 :(得分:1)

修改raddb/policy.conf

添加

acct_unique {
    update request {
            Acct-Unique-Session-Id := "%{md5:%{User-Name},%{Acct-Session-ID},%{NAS-IP-Address},%{NAS-Identifier},%{NAS-Port-ID},%{NAS-Port}}"
    }
}

然后,您可以在acct_unique部分顶部的raddb/sites-available/default中添加对preacct {}的来电,以生成Acct-Unique-Session-ID属性。