[ FreeRadius Snapshot 20020128 on Redhat 7.1, MySQL
authentication/accounting. Cisco 3640 NAS. ]
Hmmm...
FR doesn't seem to be updating my radacct table correctly with
Framed-IP-Address properly in the accounting update packet.
A full FR debug trace is below of the entire login is below, but
essentially the SQL UPDATE statement at the end which does the final
accounting update step appears to have blanked the username field (so it's
obviously not finding the right radacct record to update). The accounting
update packet from the NAS shows the username present.
The accounting start INSERT has the username correctly, and adds it's
record just fine. It just seems to be the update.
My sql.conf SQL statements show ${SQL-user-name} in both queries for the
user name value.
(sorry - haven't gone code digging as I'm not a code junkie...)
Anyone any ideas?
Regards,
SB
----
rad_recv: Access-Request packet from host 80.84.160.4:1645, id=89, length=78
NAS-IP-Address = 80.84.160.4
NAS-Port = 38
NAS-Port-Type = Async
User-Name = "barney"
Called-Station-Id = ""
Password = "f~\302!\242v\017\250y\365\251\357\250\267\247b"
Service-Type = Framed-User
Framed-Protocol = PPP
modcall: entering group authorize
modcall[authorize]: module "preprocess" returns ok
modcall[authorize]: module "suffix" returns ok
rlm_sql: Reserving sql socket id: 9
radius_xlat: 'barney'
sql_escape in: 'barney'
sql_escape out: 'barney'
sql_set_user: escaped user --> 'barney'
radius_xlat: 'SELECT id,UserName,Attribute,Value,op FROM radcheck WHERE
Username = 'barney' ORDER BY id'
SELECT id,UserName,Attribute,Value,op FROM radcheck WHERE Username =
'barney' ORDER BY id
radius_xlat: 'SELECT
radgroupcheck.id,radgroupcheck.GroupName,radgroupcheck.Attribute,radgroupcheck.Value,radgroupcheck.op
FROM radgroupcheck,usergroup WHERE usergroup.Username = 'barney' AND
usergroup.GroupName = radgroupcheck.GroupName ORDER BY radgroupcheck.id'
SELECT
radgroupcheck.id,radgroupcheck.GroupName,radgroupcheck.Attribute,radgroupcheck.Value,radgroupcheck.op
FROM radgroupcheck,usergroup WHERE usergroup.Username = 'barney' AND
usergroup.GroupName = radgroupcheck.GroupName ORDER BY radgroupcheck.id
radius_xlat: 'SELECT id,UserName,Attribute,Value,op FROM radreply WHERE
Username = 'barney' ORDER BY id'
SELECT id,UserName,Attribute,Value,op FROM radreply WHERE Username =
'barney' ORDER BY id
radius_xlat: 'SELECT
radgroupreply.id,radgroupreply.GroupName,radgroupreply.Attribute,radgroupreply.Value,radgroupreply.op
FROM radgroupreply,usergroup WHERE usergroup.Username = 'barney' AND
usergroup.GroupName = radgroupreply.GroupName ORDER BY radgroupreply.id'
SELECT
radgroupreply.id,radgroupreply.GroupName,radgroupreply.Attribute,radgroupreply.Value,radgroupreply.op
FROM radgroupreply,usergroup WHERE usergroup.Username = 'barney' AND
usergroup.GroupName = radgroupreply.GroupName ORDER BY radgroupreply.id
rlm_sql: Released sql socket id: 9
modcall[authorize]: module "sql" returns ok
modcall: group authorize returns ok
auth: type Local
auth: user supplied User-Password matches local User-Password
Login OK: [barney/betty] (from nas mfn-dial01 port 38)
Sending Access-Accept of id 89 to 80.84.160.4:1645
Framed-IP-Netmask = 255.255.255.255
Framed-Compression = Van-Jacobson-TCP-IP
Framed-Protocol = PPP
Service-Type = Framed-User
Idle-Timeout = 900
Cisco-AVPair = "ip:dns-servers=80.84.160.1 194.205.66.1"
Finished request 4
Going to the next request
--- Walking the entire request list ---
Waking up in 6 seconds...
rad_recv: Accounting-Request packet from host 80.84.160.4:1646, id=90,
length=88
NAS-IP-Address = 80.84.160.4
NAS-Port = 38
NAS-Port-Type = Async
User-Name = "barney"
Called-Station-Id = ""
Acct-Status-Type = Start
Acct-Authentic = RADIUS
Service-Type = Framed-User
Acct-Session-Id = "00000011"
Framed-Protocol = PPP
Acct-Delay-Time = 0
modcall: entering group preacct
modcall[preacct]: module "suffix" returns ok
modcall[preacct]: module "preprocess" returns noop
modcall: group preacct returns ok
modcall: entering group accounting
radius_xlat: '/usr/local/var/log/radius/radacct/80.84.160.4/detail'
rlm_detail: /usr/local/var/log/radius/radacct/%{Client-IP-Address}/detail
expands to /usr/local/var/log/radius/radacct/80.84.160.4/detail
modcall[accounting]: module "detail" returns ok
modcall[accounting]: module "unix" returns ok
rlm_sql: Reserving sql socket id: 9
radius_xlat: 'barney'
sql_escape in: 'barney'
sql_escape out: 'barney'
sql_set_user: escaped user --> 'barney'
radius_xlat: '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) values('', '00000011', '',
'barney', 'DEFAULT', '80.84.160.4', '', 'Async', '2002-01-28 11:34:55',
'0', '0', 'RADIUS', '', '', '0', '0', '', '', '', 'Framed-User', 'PPP', '',
'0', '0')'
query: 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) values('', '00000011', '',
'barney', 'DEFAULT', '80.84.160.4', '', 'Async', '2002-01-28 11:34:55',
'0', '0', 'RADIUS', '', '', '0', '0', '', '', '', 'Framed-User', 'PPP', '',
'0', '0')
rlm_sql: Released sql socket id: 9
modcall[accounting]: module "sql" returns ok
radius_xlat: 'barney'
modcall[accounting]: module "radutmp" returns ok
modcall: group accounting returns ok
Sending Accounting-Response of id 90 to 80.84.160.4:1646
Finished request 5
Going to the next request
Cleaning up request 5 ID 90 with timestamp 3c55375f
rl_next: returning NULL
Waking up in 6 seconds...
rad_recv: Accounting-Request packet from host 80.84.160.4:1646, id=91,
length=94
NAS-IP-Address = 80.84.160.4
NAS-Port = 38
NAS-Port-Type = Async
User-Name = "barney"
Called-Station-Id = ""
Acct-Status-Type = Alive
Acct-Authentic = RADIUS
Service-Type = Framed-User
Acct-Session-Id = "00000011"
Framed-Protocol = PPP
Framed-IP-Address = 80.84.161.74
Acct-Delay-Time = 0
modcall: entering group preacct
modcall[preacct]: module "suffix" returns ok
modcall[preacct]: module "preprocess" returns noop
modcall: group preacct returns ok
modcall: entering group accounting
radius_xlat: '/usr/local/var/log/radius/radacct/80.84.160.4/detail'
rlm_detail: /usr/local/var/log/radius/radacct/%{Client-IP-Address}/detail
expands to /usr/local/var/log/radius/radacct/80.84.160.4/detail
modcall[accounting]: module "detail" returns ok
modcall[accounting]: module "unix" returns noop
rlm_sql: Reserving sql socket id: 9
radius_xlat: 'UPDATE radacct SET FramedIPAddress = '80.84.161.74' WHERE
AcctSessionId = '00000011' AND UserName = '' AND NASIPAddress=
'80.84.160.4''
query: UPDATE radacct SET FramedIPAddress = '80.84.161.74' WHERE
AcctSessionId = '00000011' AND UserName = '' AND NASIPAddress= '80.84.160.4'
rlm_sql: Released sql socket id: 9
modcall[accounting]: module "sql" returns ok
radius_xlat: 'barney'
modcall[accounting]: module "radutmp" returns ok
modcall: group accounting returns ok
Sending Accounting-Response of id 91 to 80.84.160.4:1646
Finished request 6
Going to the next request
Cleaning up request 6 ID 91 with timestamp 3c55375f
rl_next: returning NULL
Waking up in 6 seconds...
--- Walking the entire request list ---
Cleaning up request 4 ID 89 with timestamp 3c55375f
Nothing to do. Sleeping until we see a request.
----
Scott Bartlett ([EMAIL PROTECTED])
BTA Limited
100 High Street Wandsworth
London SW18 4LA
United Kingdom
Tel:020 8871 4240 Fax:020 8871 4584
http://www.bta.com
Network Consultancy and Support for Windows 9x/NT and MacOS.
Internet connectivity, solutions, and business services.
This message is intended only for the use of the person(s) ("The intended
recipient(s)") to whom it is addressed. It may contain information which
is privileged and confidential within the meaning of applicable law. If
you are not the intended recipient, please contact the sender as soon as
possible. The views expressed in this communication may not necessarily be
the views held by BTA.
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html