LoginHost logging

emerald@nls.net
Wed, 27 May 1998 19:36:51 -0400

Hi guys.

I am using livingston PM3 and it seems their new comOS now likes to send
accounting packs to radius whenever someone telnets into the PM3 (wonderful
feature without a friggin off switch).

Anyway, I managed to setup a NASPort default so the stupid things at least
get a response and stop sending the packets repeatedly.

Now I'm trying to get the radius database to actually log something useful
about these. I have it logging the entries but it wouldn't log the
Login-Host parameter that the portmaster sends back, so I modified some of
the tables as follows:

ALTER TABLE Calls
Add LoginHost varchar (16) NULL DEFAULT NULL
GO

ALTER TABLE ServerPorts
Add LoginHost varchar (16) NULL DEFAULT NULL
GO

if exists (select * from sysobjects where id =3D
object_id('dbo.calls_insert') and sysstat & 0xf =3D 8)
drop trigger dbo.calls_insert
GO

CREATE TRIGGER calls_insert ON dbo.Calls=20
FOR INSERT
AS
UPDATE ServerPorts
Set sp.UserName =3D i.UserName,
sp.AcctStatusType =3D i.AcctStatusType,
sp.CallDate =3D DateAdd(Second, 0-i.AcctDelayTime, i.CallDate),
sp.FramedAddress =3D i.FramedAddress,
sp.ConnectInfo =3D i.ConnectInfo,
sp.CallerID =3D i.CallerID,
sp.LoginHost =3D i.LoginHost
FROM Servers s, ServerPorts sp, inserted i
WHERE s.IPAddress =3D i.NASIdentifier AND
s.ServerID =3D sp.ServerID AND
sp.Port =3D i.NASPort AND
sp.CallDate <=3D DateAdd(Second, 0-i.AcctDelayTime, i.CallDate)

UPDATE SubAccounts
Set sa.TimeLeft =3D sa.TimeLeft - (i.AcctSessionTime/60 + 1)
FROM SubAccounts sa, inserted i
WHERE sa.login =3D i.UserName
and sa.TimeLeft <> NULL
and i.AcctStatusType =3D 2
GO

But for some reason now it appears to be logging something although I've no
idea what? Here is the output I get when I do a query:

loginhost =20
----------------=20
=A59=8F=96 =20
=A59=8F=96 =20
=A59=8F=96 =20
=A59=8F=96 =20

This obviously doesn't look like the IP address that should appear. Dale, if
your reading, I sure could use some of the wizardry right about now, my head
is starting to hurt.

Geo.
Netlink