Hello Gildas -
On Mon, 09 Oct 2000, Gildas PERROT wrote:
> Hi,
>
> I would like to modify SQL accounting in order to :
>
> - only Insert in RADONLINE for Alive packets and not Start packets (I am
> using Cisco AS and IP is not present in Start but Alive packets)
>
The session database code already handles Cisco Alive packets. Have a look at
the code in "Radius/Handler.pm".
> - only Insert in ACCOUNTING for Stop packets where FRAMEDIPADDRESS is not
> null. Sometimes, due to a problem between the terminal and the NAS, I have :
>
> insert into ACCOUNTING
> (USERNAME, TIME_STAMP, ACCTSTATUSTYPE, ACCTDELAYTIME,
> ACCTINPUTOCTETS, ACCTOUTPUTOCTETS, ACCTSESSIONID, ACCTSESSIONTIME, NASPORT,
> CALLINGID, CALLEDID)
> values ('carrefour', 970845773, 'Stop', 0,
> 89, 137, '000000A7', 4, 3, '670487956', '6641')
>
> Note : FRAMEDIPADDRESS is not present since it is NULL so I do not want and
> insert query in that case.
>
You should probably use a special Handler for this, something like:
<Handler Request-Type = Accounting-Request, Framed-IP-Address = /[0-9]/>
<AuthBy SQL>
AccountingStopsOnly
........
</AuthBy>
</Handler>
<Handler Request-Type = Accounting-Request>
....
</Handler>
Note that you will have to catch the other accounting requests as well.
hth
Hugh
--
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
Platypus, Freeside, Interbiller, TACACS+, PAM, external, etc, etc.
Available on Unix, Linux, FreeBSD, Windows 95/98/2000, NT, MacOS X.
===
Archive at http://www.starport.net/~radiator/
Announcements on [EMAIL PROTECTED]
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.