Hi, I’m running freeRadius 3.0.3 with an oracle database. I enabled the cisco hack in preprocess module and it appears to be working for start records, however, for stop records I get an error 'Unknown attribute’ for the dsp-id. Here is a debug snip from a stop record: Received Accounting-Request Id 125 Cisco-AVPair = 'dsp-id=1/1:1' Acct-Status-Type = Stop ….. (6) ERROR: sql : ... isconnect-cause}', DSPID = '%{dsp-id}' WHERE AcctSessionId = '%{Acct-Session-Id}' AND UserName = '%{SQL-User-Name}' AND NASIPAddress = '%{NAS-IP-Address}' AND AcctStopTime IS NULL (6) ERROR: sql : ... ^ Unknown attribute Here is a debug snip from the start record that works: Received Accounting-Request Id 120 Cisco-AVPair = 'call-id=DA889581-EC2611E3-8C62BC7B-A853074F@172.17.8.11' Acct-Status-Type = Start …… (1) sql : EXPAND INSERT INTO radacct (RadAcctId, AcctSessionId, AcctUniqueId, UserName, Realm, NASIPAddress, NASPortId, NASPortType, AcctStartTime, AcctStopTime, AcctSessionTime, AcctAuthentic, ConnectInfo_start, ConnectInfo_stop, AcctInputOctets, AcctOutputOctets, CalledStationId, CallingStationId, AcctTerminateCause, ServiceType, FramedProtocol, FramedIPAddress, AcctStartDelay, AcctStopDelay, XAscendSessionSvrKey, CallID) VALUES('', '%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port-Id}', '%{NAS-Port-Type}', TO_DATE('%S','yyyy-mm-dd hh24:mi:ss'), NULL, '0', '%{Acct-Authentic}', '%{h323-setup-time}', '', '0', '0', '%{Called-Station-Id}', '%{Calling-Station-Id}', '', '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', '%{Acct-Delay-Time}', '0', '%{X-Ascend-Session-Svr-Key}', '%{call-id}’) Here is the update query from my queries file: UPDATE ${....acct_table2} \ SET \ AcctStopTime = TO_DATE('%S','yyyy-mm-dd hh24:mi:ss'), \ AcctSessionTime = '%{Acct-Session-Time}', \ AcctInputOctets = '%{Acct-Input-Octets}' + \ ('%{%{Acct-Input-Gigawords}:-0}' * 4294967296), \ AcctOutputOctets = '%{Acct-Output-Octets}' + \ ('%{%{Acct-Output-Gigawords}:-0}' * 4294967296), \ AcctTerminateCause = '%{Acct-Terminate-Cause}', \ AcctStopDelay = '%{%{Acct-Delay-Time}:-0}', \ ConnectInfo_stop = '%{h323-disconnect-time}', \ ACCTTERMINATECAUSE = '%{h323-disconnect-cause}', \ DSPID = '%{dsp-id}' \ WHERE AcctSessionId = '%{Acct-Session-Id}' \ AND UserName = '%{SQL-User-Name}' \ AND NASIPAddress = '%{NAS-IP-Address}' \ AND AcctStopTime IS NULL" Is there another place I need to enable the cisco hack? Thanks! Chuck
On 5 Jun 2014, at 21:52, Chuck <cwbl301@gmail.com> wrote:
Hi, I’m running freeRadius 3.0.3 with an oracle database. I enabled the cisco hack in preprocess module and it appears to be working for start records, however, for stop records I get an error 'Unknown attribute’ for the dsp-id.
Lets break down this error message, quite simple as it's only two words. Unknown - Something is not known. Attribute - an attribute. Why might one attribute be known and another not? Does FreeRADIUS have a priori knowledge of attributes? No? Well where might attributes come from, what makes one attribute known and another unknown. Answer this question and you will find the answer to your original one too. Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
It now works after I modified: /usr/local/share/freeradius/dictionary.cisco and added: ATTRIBUTE dsp-id 254 string Is that the correct or recommended solution? Thanks On Jun 5, 2014, at 4:05 PM, Arran Cudbard-Bell <a.cudbardb@freeradius.org> wrote:
On 5 Jun 2014, at 21:52, Chuck <cwbl301@gmail.com> wrote:
Hi, I’m running freeRadius 3.0.3 with an oracle database. I enabled the cisco hack in preprocess module and it appears to be working for start records, however, for stop records I get an error 'Unknown attribute’ for the dsp-id.
Lets break down this error message, quite simple as it's only two words.
Unknown - Something is not known. Attribute - an attribute.
Why might one attribute be known and another not? Does FreeRADIUS have a priori knowledge of attributes? No? Well where might attributes come from, what makes one attribute known and another unknown.
Answer this question and you will find the answer to your original one too.
Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team
FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On 5 Jun 2014, at 23:39, Chuck <cwbl301@gmail.com> wrote:
It now works after I modified:
/usr/local/share/freeradius/dictionary.cisco
and added: ATTRIBUTE dsp-id 254 string
Is that the correct or recommended solution?
Yes. I'll add it to the cisco dictionary. Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
On 6 Jun 2014, at 12:44, Alan DeKok <aland@deployingradius.com> wrote:
Arran Cudbard-Bell wrote:
I'll add it to the cisco dictionary.
Only if it's correct.
He could have simply invented the definition, which shouldn't be reproduced.
It's a proper cisco attribute name (I checked). AFAIK the Cisco-AVPair definitions don't have proper protocol equivalent? As in There's no proper DSP-ID VSA defined by Cisco, only the one in their shitty format. I'm guessing the reason why the other attributes like that in the Cisco dictionary are given protocol attribute numbers (> 1 && <= 255) is so that FreeRADIUS can be used to proxy to less able RADIUS servers. Is that right? So numbering of the Cisco-AVPair definitions is really completely arbitrary, they just have to not conflict with actual Cisco VSAs (of which there seems to be a few too). -Arran Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
participants (3)
-
Alan DeKok -
Arran Cudbard-Bell -
Chuck