Freeradius 3.0.8 - expansion and unlang - concatenation of AVPs
Hello all, With freeradius 3.0.8 and MariaDB 10.0.19 I am struggling with concatenation of AVP in case of their multiple occurrence: According to http://freeradius.org/radiusd/man/unlang.html the expansion below should produce a string separated by n _%{Attribute-Name[*]}_ _ All values of Attribute-Name, concatenated together with n as the separator. _ Basicaly it works. But what I can see is than instead of a newline there is "=2C" sequence inserted to the acct table. It regards Dynamic-QoS-Param AVP below: query = " INSERT INTO ${....acct_table1} (${...column_list}) VALUES ('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{NAS-IP-Address}', '%{NAS-Port-Id}', FROM_UNIXTIME(%{integer:Event-Timestamp}), FROM_UNIXTIME(%{integer:Event-Timestamp}), NULL, NULL, '%{Connect-Info}', '%{Acct-Input-Octets}', '%{Acct-Output-Octets}', '%{Acct-Input-Packets}', '%{Acct-Output-Packets}', '%{Acct-Input-Gigawords}', '%{Acct-Output-Gigawords}', '%{Called-Station-Id}', '%{Calling-Station-Id}', '%{Callback-Number}', '%{Framed-IP-Address}', '%{Acct-Delay-Time}', '0', '%{Acct-Status-Type}', '%{Acct-Terminate-Cause}', '%{Mac-Addr}', '%{NAS-Identifier}', '%{Dynamic-QoS-Param[*]}')" And when sql trace tunrned on, I can see that it is being inserted in this way by freeradius: INSERT INTO radacct_adsl (......., 'pwfq-circuit-rate-max 23716 parent=2Cpolice-circuit-rate rate-absolute 2240 parent'); Client charset and DB charset is utf8. "2c" represents comma in utf8. What am I doing wrong? Regards Ales
Man page should say ',', i've pushed a fix. Add ',' to the safe characters list if you don't want it escaped. Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS development team FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
It works, perfect. Thanks Arran! Ales On Mon, 8 Jun 2015 08:16:18 -0400, Arran Cudbard-Bell wrote:
Man page should say ',', i've pushed a fix.
Add ',' to the safe characters list if you don't want it escaped.
Arran Cudbard-Bell FreeRADIUS development team
FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
Links: ------ [1] mailto:a.cudbardb@freeradius.org
participants (2)
-
Aleš Rygl -
Arran Cudbard-Bell