hints processing for Accounting-On / Off packets?
Stefan Winter
stefan.winter at restena.lu
Mon Feb 13 09:08:41 CET 2006
Hello,
on my system I noticed that Accounting-On/Off packets don't seem to get the
same treatment as other accoutning packets. The situation is as follows:
- FreeRADIUS 1.0.5
- "hints" file tags packets according to the rule:
DEFAULT Client-IP-Address == 158.64.A.B, Acct-Type := LuxDSL-COPS
RESTENA-Service-Type := LuxDSL-COPS-Logging
- RESTENA-Service-Type is a dictionary-defined VSA
- a detail instance logs packets according to that RESTENA-Service-Type, the
stanza is:
detail {
detailfile = ${radacctdir}/%Y%m%d/%{RESTENA-Service-Type}-service/detail
detailperm = 0600
}
Now what happens is that all normal accounting packets from 158.64.A.B (of
course A and B are integers) get logged correctly; excerpt from today's
detail in /var/log/radius/radacct/20060213/LuxDSL-COPS-Logging-service/detail
Mon Feb 13 00:00:00 2006
Acct-Status-Type = Stop
Acct-Delay-Time = 1056177
Acct-Input-Octets = 1075686
Acct-Input-Gigawords = 0
Acct-Input-Packets = 11792
Acct-Output-Octets = 28370647
Acct-Output-Gigawords = 0
Acct-Output-Packets = 20519
Acct-Session-Time = 4422
Acct-Terminate-Cause = Lost-Carrier
User-Name = "134331891"
Acct-Session-Id = "Res_START:134331891:1138724602258:21722"
Framed-IP-Address = 158.64.X.Y
NAS-Identifier = "SAE.UMC2"
NAS-Port-Id = "restena at ptras03 ATM 2/0.517:10.481"
NAS-Port = 537526753
NAS-IP-Address = 192.168.1.3
Acct-Multi-Session-Id = "erx atm 2/0.517:10.481:0030496306"
Event-Timestamp = "Jan 31 2006 18:37:04 CET"
Client-IP-Address = 158.64.A.B
RESTENA-Service-Type := "LuxDSL-COPS-Logging"
Timestamp = 1139785200
This shows that using hints for tagging the packet works as it is supposed to.
But when an Accounting-On/Off packet arrives from the same IP, it does _not_
get tagged from the hints file, i.e. it lands in a
file /var/log/radius/radacct/20060213/-service/detail,
%{RESTENA-Service-Type} expands to nothing and the packet itself also doesn't
contain a trace of a newly-set attribute, see the content of that detail
file:
Mon Feb 13 00:36:38 2006
Acct-Status-Type = Accounting-On
Acct-Delay-Time = 978868
NAS-Identifier = "SAE.umc5 restena at ptras06"
NAS-IP-Address = 192.168.1.5
Event-Timestamp = "Feb 1 2006 16:42:09 CET"
Acct-Session-Id = "restena at ptras06"
Client-IP-Address = 158.64.A.B
Timestamp = 1139787398
(In case you wonder about those large Acct-Delay-Time values: we are currently
doing a log replay with radrelay from that 158.64.A.B server.)
Now I wonder why these packets aren't tagged by hints, even though they have
the same Client-IP-Address as normal packets and normal packets _do_ get
tagged.
Anyone a clue?
Greetings,
Stefan Winter
--
Stefan WINTER
RESTENA Foundation - Réseau Téléinformatique de l'Education Nationale et de
la Recherche
R&D Engineer
6, rue Richard Coudenhove-Kalergi
L-1359 Luxembourg
email: stefan.winter at restena.lu Tel.: +352 424409-1
http://www.restena.lu Fax: +352 422473
More information about the Freeradius-Users
mailing list