Cisco-AVPair SQL accounting (attr. not duplicated)
G'day, Sorry if this has been covered already, as I imagine it's a common issue, but I haven't been able to rustle any working answers up after a long time googling and grepping $FR/src. I've got an AS5300 that sends a few attributes, with accounting stop, encapsulated in Cisco-AVPair eg: Cisco-AVPair = "nas-tx-speed=53300" and the VSA hack doesn't appear to let me refer to that value in my SQL statements with either the %{nas-tx-speed} or %{Cisco-AVPair[index]} syntaxes I've seen suggested for Cisco VSAs in various places. rlm_sql complains of an unknown xlat function or non-existent attribute. Has anyone managed to do this? If so, what is the correct syntax to use these in SQL accounting statements? Cheers, -- James Wakefield Systems Administrator +61 03 5227 6888 We have now moved head office to 8-12 Pakington Street, Geelong West.
James Wakefield wrote:
I've got an AS5300 that sends a few attributes, with accounting stop, encapsulated in Cisco-AVPair eg: Cisco-AVPair = "nas-tx-speed=53300" and the VSA hack doesn't appear to let me refer to that value in my SQL statements with either the %{nas-tx-speed} or %{Cisco-AVPair[index]} syntaxes I've seen suggested for Cisco VSAs in various places. rlm_sql complains of an unknown xlat function or non-existent attribute.
Has anyone managed to do this? If so, what is the correct syntax to use these in SQL accounting statements?
The syntax %{Cisco-AVPair[n]} isn't supported in versions 1.0.x of FreeRADIUS. I'd suggest to get and try the CVS version which is about to be 1.1.0 very soon. $ cvs -d :pserver:anoncvs@cvs.freeradius.org:/source login CVS password: anoncvs $ cvs -d :pserver:anoncvs@cvs.freeradius.org:/source checkout -r branch_1_1 radiusd -- Nicolas Baradakis
Try using += as the op, that should do it. Ex. Cisco-AVPair += "nas-tx-speed=53300" -----Original Message----- From: freeradius-users-bounces@lists.freeradius.org [mailto:freeradius-users-bounces@lists.freeradius.org] On Behalf Of James Wakefield (Sunet Sysadmin) Sent: Thursday, December 15, 2005 1:22 AM To: FreeRadius users mailing list Subject: Cisco-AVPair SQL accounting (attr. not duplicated) G'day, Sorry if this has been covered already, as I imagine it's a common issue, but I haven't been able to rustle any working answers up after a long time googling and grepping $FR/src. I've got an AS5300 that sends a few attributes, with accounting stop, encapsulated in Cisco-AVPair eg: Cisco-AVPair = "nas-tx-speed=53300" and the VSA hack doesn't appear to let me refer to that value in my SQL statements with either the %{nas-tx-speed} or %{Cisco-AVPair[index]} syntaxes I've seen suggested for Cisco VSAs in various places. rlm_sql complains of an unknown xlat function or non-existent attribute. Has anyone managed to do this? If so, what is the correct syntax to use these in SQL accounting statements? Cheers, -- James Wakefield Systems Administrator +61 03 5227 6888 We have now moved head office to 8-12 Pakington Street, Geelong West. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
participants (3)
-
James Wakefield (Sunet Sysadmin) -
Lenir -
Nicolas Baradakis