[RADIATOR] Radius::LogFormat::format_acctlog_json(@_); not logging Framed-IPv6-Address

Peter Havekes p.havekes at avans.nl
Mon Nov 26 13:05:18 UTC 2018


Hello,

It seems that adding "AcctLogFileFormatHook sub {
Radius::LogFormat::format_acctlog_json(@_); }" to my accounting log
format prevents logging the Framed-IPv6-Address. Without defining the
logformat the ipv6 address is logged as seen in this example:

Mon Nov 26 13:47:43 2018
    User-Name = "XXXXX at avans.nl"
    NAS-IP-Address = 145.48.X.X
    NAS-Port = 0
    NAS-Port-Type = Wireless-IEEE-802-11
    Acct-Session-Id = "XXXXXXXXXXXX-YYYYYYYYY-000000"
    Event-Timestamp = 1543236463
    Acct-Multi-Session-Id = "XXXXXXXXXXXX-YYYYYYYYYYYYY"
    Framed-IPv6-Address = 2001:610:1a0:1300:xxxx:xxxx:xxxx:xxxx
    Calling-Station-Id = "XXXXXXXXXXXXXX"
    Called-Station-Id = "XXXXXXXXXX:eduroam"
    Acct-Delay-Time = 0
    Aruba-Essid-Name = "eduroam"
    Aruba-Location-Id = "xxxxxx"
    Aruba-AP-Group = "xxxxxxx"
    Aruba-User-Role = "avans-xxxxxxxxx"
    Aruba-User-Vlan = 999
    Aruba-Device-Type = "iPhone"
    Acct-Status-Type = Start
    Acct-Authentic = RADIUS
    Originating-Line-Info = "wireless"
    service-identifier = "wlan"
    service-provider = "avans.nl"
    Timestamp = 1543236463

When adding the AcctLogFileFormatHook to log in json, all information is
logged, except for the ipv6 address

Example (same user):

{"calling_station_id":"XXXXXXXXXX","username":"XXXXX at avans.nl","time":"1543233824","timestamp":"Mon
Nov 26 13:03:44
2018","source_host":"xxxxx","nas_port":"0","nas_identifier":"","nas_ip_address":"145.48.X.Y","acct_session_id":"XXXXXXXXXXXXXXXXX-YYYYYY-0000","called_station_id":"xxxxxxxxxx:eduroam","acct_status_type":"Start","framed_ip_address":"","type":"accounting"}


How can I log the IPv6 address in accounting in json format? The goodies
mention a custom log format, but how do I define a log format? Can
anyone provide a sample "CustomLogFormat.pm"?

LogFormatHook sub { require "/etc/radiator/CustomLogFormat.pm";
CustomLogFormat::format_log_json(@_); }






-- 

Peter Havekes

Technisch Architect & CSIRT | Diensteenheid ICT en Facilitair
Avans Hogeschool | 0885256592 | Onderwijsboulevard 215 |
5223 DE 's-Hertogenbosch | http://www.avans.nl


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3589 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://lists.open.com.au/pipermail/radiator/attachments/20181126/9a4fde58/attachment.p7s>


More information about the radiator mailing list