Freeradius 3.0.8 - expansion and unlang - concatenation of AVPs
Aleš Rygl
ales at rygl.net
Mon Jun 8 12:28:53 CEST 2015
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
More information about the Freeradius-Users
mailing list