(RADIATOR) radiator hooks
Jason Stechschulte
jasons at wcoil.com
Thu Jun 2 20:59:00 CDT 2005
On Fri, Jun 03, 2005 at 11:16:25AM +1000, Hugh Irvine wrote:
> This is quite simple to do with a single AcctSQLStatement - see
> "goodies/prepaid.cfg" for an example.
Wow, I was making this *much* more difficult that it had to be. This is
actually pretty simple. Thanks. I'd still like to try to figure out
these hooks for future reference though.
> In answer to your question about your hook - I suspect you have not
> set an "Identifier" in your Client clause.
>
> And you should have a look at a trace 4 debug to see what requests
> you are actually receiving, as it sounds like you are not receiving
> any accounting requests at all.
Well here is a trace 4 debug showing an accounting start record:
Thu Jun 2 21:37:55 2005: DEBUG: Packet dump:
*** Received from 65.17.128.37 port 33428 ....
Code: Accounting-Request
Identifier: 141
Authentic: <189><167>B<215>W<175><178>(<178><5><231>Hr<226>Dh
Attributes:
Acct-Status-Type = Start
Acct-Session-Id = "875"
User-Name = "sputniktest at wcoil.com"
NAS-Identifier = "info.wcoil.com"
Framed-IP-Address = 192.168.190.10
Called-Station-Id = "00:0e:9b:9a:30:09"
Thu Jun 2 21:37:55 2005: DEBUG: Rewrote user name to
sputniktest at wcoil.com
Thu Jun 2 21:37:55 2005: DEBUG: Handling request with Handler
'Realm=wcoil.com'
Thu Jun 2 21:37:55 2005: DEBUG: Rewrote user name to
sputniktest at wcoil.com
Thu Jun 2 21:37:55 2005: DEBUG: Rewrote user name to
sputniktest at wcoil.com
Thu Jun 2 21:37:55 2005: DEBUG: Rewrote user name to sputniktest
Thu Jun 2 21:37:55 2005: DEBUG: Rewrote user name to sputniktest
Thu Jun 2 21:37:55 2005: DEBUG: Rewrote user name to
sputniktest at wcoil.com
Thu Jun 2 21:37:55 2005: DEBUG: sessions Adding session for
sputniktest at wcoil.com, 65.17.128.37,
Thu Jun 2 21:37:55 2005: DEBUG: do query is: 'delete from RADONLINE
where NASIDENTIFIER='65.17.128.37' and NASPORT=00':
Thu Jun 2 21:37:55 2005: DEBUG: do query is: 'insert into RADONLINE
(USERNAME, NASIDENTIFIER, NASPORT, ACCTSESSIONID, TIME_STAMP,
FRAMEDIPADDRESS, NASPORTTYPE, SERVICETYPE) values
('sputniktest at wcoil.com', '65.17.128.37', 0, '875', 1117762675,
'192.168.190.10', '', '')':
Thu Jun 2 21:37:55 2005: DEBUG: Handling with Radius::AuthSQL
Thu Jun 2 21:37:55 2005: DEBUG: Handling accounting with
Radius::AuthSQL
************
Jason's Client Identifier =
************
Thu Jun 2 21:37:55 2005: DEBUG: Accounting accepted
And here is a trace 4 debug showing an accounting stop record:
Thu Jun 2 22:01:26 2005: DEBUG: Packet dump:
*** Received from 65.17.128.37 port 33478 ....
Code: Accounting-Request
Identifier: 186
Authentic: p'<153>w<167>N<180><141><150><230>6<158>3BZ<210>
Attributes:
Acct-Status-Type = Stop
Acct-Session-Id = "875"
User-Name = "sputniktest at wcoil.com"
NAS-Identifier = "info.wcoil.com"
Framed-IP-Address = 192.168.190.10
Acct-Session-Time = 1411
Acct-Input-Octets = 1507933
Acct-Output-Octets = 373818
Acct-Input-Packets = 3105
Acct-Output-Packets = 4070
Thu Jun 2 22:01:26 2005: DEBUG: Rewrote user name to
sputniktest at wcoil.com
Thu Jun 2 22:01:26 2005: DEBUG: Handling request with Handler
'Realm=wcoil.com'
Thu Jun 2 22:01:26 2005: DEBUG: Rewrote user name to
sputniktest at wcoil.com
Thu Jun 2 22:01:26 2005: DEBUG: Rewrote user name to
sputniktest at wcoil.com
Thu Jun 2 22:01:26 2005: DEBUG: Rewrote user name to sputniktest
Thu Jun 2 22:01:26 2005: DEBUG: Rewrote user name to sputniktest
Thu Jun 2 22:01:26 2005: DEBUG: Rewrote user name to
sputniktest at wcoil.com
Thu Jun 2 22:01:26 2005: DEBUG: sessions Deleting session for
sputniktest at wcoil.com, 65.17.128.37,
Thu Jun 2 22:01:26 2005: DEBUG: do query is: 'delete from RADONLINE
where NASIDENTIFIER='65.17.128.37' and NASPORT=0':
Thu Jun 2 22:01:26 2005: DEBUG: Handling with Radius::AuthSQL
Thu Jun 2 22:01:26 2005: DEBUG: Handling accounting with
Radius::AuthSQL
Thu Jun 2 22:01:26 2005: DEBUG: do query is: 'insert into
acct_table
(ACCTINPUTOCTETS,ACCTOUTPUTOCTETS,ACCTSESSIONID,ACCTSESSIONTIME,ACCTSTATUSTYPE,FRAMEDIPADDRESS,USERNAME)
values
(1507933,373818,'875',1411,'Stop','192.168.190.10','sputniktest at wcoil.com')':
************
Jason's Client Identifier =
************
Thu Jun 2 22:01:26 2005: DEBUG: Accounting accepted
--
Jason Stechschulte
Network Administrator
West Central Ohio Internet Link
Lima, OH USA
--
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.
More information about the radiator
mailing list