empty vsa attributes in sql

Martin Ovenstone ovenstone at bluewin.ch
Thu Aug 3 17:31:12 CEST 2006


Hi

Can someone help me to get the erx vsa attributtes into the mysql.
As I can see they are processed correctly, but the sql statement is 
empty for this part.

Regards
Martin Ovenstone

relevant VSAs
        ERX-Input-Gigapkts = 2
        ERX-Output-Gigapkts = 1
        ERX-Pppoe-Description = "pppoe 00:12:59:12:90:4e"
        ERX-Ingress-Policy-Name = "L2TP50"
==
conf.sql
....
accounting_stop_query = "INSERT into ${acct_table2} (AcctStatusType, 
UserName, EventTimestamp, AcctDelayTime, NASIdentifier, AcctSessionId, 
NASIPAddress, Class, ServiceType, FramedProtocol, FramedCompression, 
CallingStationId, AcctTunnelConnection, AcctInputGigawords, 
AcctInputOctets, AcctOutputGigawords, AcctOutputOctets, 
AcctInputPackets, AcctOutputPackets, ConnectInfo, NASPortType, NASPort, 
NASPortId, AcctSessionTime, AcctTerminateCause, AcctAuthentic, 
TunnelType, TunnelPreference, TunnelMediumType, TunnelClientEndpoint, 
TunnelClientAuthId, TunnelServerEndpoint, TunnelServerAuthId, 
TunnelAssignmentId, AcctInputGigapackets, AcctOutputGigapackets, 
PppoeDescription, IngressPolicyName ) values( '%{Acct-Status-Type}', 
'%{User-Name}', '%{Event-Timestamp}', '%{Acct-Delay-Time}', 
'%{NAS-Identifier}', '%{Acct-Session-Id}', '%{NAS-IP-Address}', 
'%{Class}', '%{Service-Type}', '%{Framed-Protocol}', 
'%{Framed-Compression}', '%{Calling-Station-Id}', 
'%{Acct-Tunnel-Connection}', '%{Acct-Input-Gigawords}', 
'%{Acct-Input-Octets}', '%{Acct-Output-Gigawords}', 
'%{Acct-Output-Octets}', '%{Acct-Input-Packets}', 
'%{Acct-Output-Packets}', '%{Connect-Info}', '%{NAS-Port-Type}', 
'%{NAS-Port}', '%{NAS-Port-Id}', '%{Acct-Session-Time}', 
'%{Acct-Terminate-Cause}', '%{Acct-Authentic}', '%{Tunnel-Type}', 
'%{Tunnel-Preference}', '%{Tunnel-Medium-Type}', 
'%{Tunnel-Client-Endpoint}', '%{Tunnel-Client-Auth-Id}', 
'%{Tunnel-Server-Endpoint}', '%{Tunnel-Server-Auth-Id}', 
'%{Tunnel-Assignment-Id}', '%{request:Acct-Input-Gigapackets}', 
'%{request:Acct-Output-Gigapackets}', '%{request:Pppoe-Description}', 
'%{request:Ingress-Policy-Name}')"
...
===
Output of radiusd -X
......
rad_recv: Accounting-Request packet from host 192.168.1.35:49273, 
id=141, length=453
        Acct-Status-Type = Stop
        User-Name = "testuser at mydomain.net"
        Event-Timestamp = "Jun 28 2006 00:00:00 CEST"
        Acct-Delay-Time = 0
        NAS-Identifier = "nasxyz"
        Acct-Session-Id = "erx atm 13/0.1123433234:11.3602:0030292668"
        NAS-IP-Address = 192.168.21.33
        Class = 0x746573745f636c6173735f303031
        Service-Type = Framed-User
        Framed-Protocol = PPP
        Framed-Compression = None
        Calling-Station-Id = "#nasxyz#A130#11#3602"
        Acct-Tunnel-Connection = "0005681578"
        Acct-Input-Gigawords = 2
        Acct-Input-Octets = 703351
        Acct-Output-Gigawords = 1
        Acct-Output-Octets = 7489000
        Acct-Input-Packets = 177814
        Acct-Output-Packets = 178321
        Connect-Info = "speed:UBR:1536"
        NAS-Port-Type = xDSL
        NAS-Port = 3490385426
        NAS-Port-Id = "atm 13/0.1123433234:11.3602"
        Acct-Session-Time = 72024
        Acct-Terminate-Cause = NAS-Request
        Acct-Authentic = RADIUS
        Tunnel-Type:0 = L2TP
        Tunnel-Preference:0 = 1
        Tunnel-Medium-Type:0 = IP
        Tunnel-Client-Endpoint:0 = "192.168.25.33"
        Tunnel-Client-Auth-Id:0 = "nasxyz"
        Tunnel-Server-Endpoint:0 = "192.168.254.106"
        Tunnel-Server-Auth-Id:0 = "lau01a03"
        Tunnel-Assignment-Id:0 = "mydomain.net_106"
        ERX-Input-Gigapkts = 2
        ERX-Output-Gigapkts = 1
        ERX-Pppoe-Description = "pppoe 00:13:49:42:90:4e"
        ERX-Ingress-Policy-Name = "L2TP50"
Processing the preacct section of radiusd.conf
modcall: entering group preacct for request 0
  modcall[preacct]: module "preprocess" returns noop for request 0
rlm_acct_unique: Hashing 'NAS-Port = 3490385426,Client-IP-Address = 
192.168.1.35,NAS-IP-Address = 192.168.21.33,Acct-Session-Id = "erx atm 
13/0.1123433234:11.3602:0030292668",User-Name = "testuser at mydomain.net"'
rlm_acct_unique: Acct-Unique-Session-ID = "8c41e765ee42c86a".
  modcall[preacct]: module "acct_unique" returns ok for request 0
    rlm_realm: Looking up realm "mydomain.net" for User-Name = 
"testuser at mydomain.net"
    rlm_realm: No such realm "mydomain.net"
  modcall[preacct]: module "suffix" returns noop for request 0
  modcall[preacct]: module "files" returns noop for request 0
modcall: leaving group preacct (returns ok) for request 0
  Processing the accounting section of radiusd.conf
modcall: entering group accounting for request 0
radius_xlat:  '/var/log/radius/radacct/192.168.1.35/detail-20060803'
rlm_detail: /var/log/radius/radacct/%{Client-IP-Address}/detail-%Y%m%d 
expands to /var/log/radius/radacct/192.168.1.35/detail-20060803
  modcall[accounting]: module "detail" returns ok for request 0
  modcall[accounting]: module "unix" returns ok for request 0
radius_xlat:  '/var/log/radius/radutmp'
radius_xlat:  'testuser at mydomain.net'
rlm_radutmp: Logout for NAS 192.168.21.33 port 3490385426, but no Login 
record
  modcall[accounting]: module "radutmp" returns ok for request 0
radius_xlat:  'testuser at mydomain.net'
rlm_sql (sql): sql_set_user escaped user --> 'testuser at mydomain.net'
radius_xlat:  'INSERT into radacct_2 (AcctStatusType, UserName, 
EventTimestamp, AcctDelayTime, NASIdentifier, AcctSessionId, 
NASIPAddress, Class, ServiceType, FramedProtocol, FramedCompression, 
CallingStationId, AcctTunnelConnection, AcctInputGigawords, 
AcctInputOctets, AcctOutputGigawords, AcctOutputOctets, 
AcctInputPackets, AcctOutputPackets, ConnectInfo, NASPortType, NASPort, 
NASPortId, AcctSessionTime, AcctTerminateCause, AcctAuthentic, 
TunnelType, TunnelPreference, TunnelMediumType, TunnelClientEndpoint, 
TunnelClientAuthId, TunnelServerEndpoint, TunnelServerAuthId, 
TunnelAssignmentId, AcctInputGigapackets, AcctOutputGigapackets, 
PppoeDescription, IngressPolicyName ) values( 'Stop', 
'testuser at mydomain.net', 'Jun 28 2006 00:00:00 CEST', '0', 'nasxyz', 
'erx atm 13/0.1123433234:11.3602:0030292668', '192.168.21.33', 
'0x746573745f636c6173735f303031', 'Framed-User', 'PPP', 'None', 
'=23nasxyz=23A130=2311=233602', '0005681578', '2', '703351', '1', 
'7489000', '177814', '178321', 'speed:UBR:1536', 'xDSL', '3490385426', 
'atm 13/0.1123433234:11.3602', '72024', 'NAS-Request', 'RADIUS', 'L2TP', 
'1', 'IP', '192.168.25.33', 'nasxyz', '192.168.254.106', 'lau01a03', 
'mydomain.net_106', '', '', '', '')'
radius_xlat:  '/var/log/radius/sqltrace.sql'
rlm_sql (sql): Reserving sql socket id: 0
rlm_sql_mysql: query:  INSERT into radacct_2 (AcctStatusType, UserName, 
EventTimestamp, AcctDelayTime, NASIdentifier, AcctSessionId, 
NASIPAddress, Class, ServiceType, FramedProtocol, FramedCompression, 
CallingStationId, AcctTunnelConnection, AcctInputGigawords, 
AcctInputOctets, AcctOutputGigawords, AcctOutputOctets, 
AcctInputPackets, AcctOutputPackets, ConnectInfo, NASPortType, NASPort, 
NASPortId, AcctSessionTime, AcctTerminateCause, AcctAuthentic, 
TunnelType, TunnelPreference, TunnelMediumType, TunnelClientEndpoint, 
TunnelClientAuthId, TunnelServerEndpoint, TunnelServerAuthId, 
TunnelAssignmentId, AcctInputGigapackets, AcctOutputGigapackets, 
PppoeDescription, IngressPolicyName ) values( 'Stop', 
'testuser at mydomain.net', 'Jun 28 2006 00:00:00 CEST', '0', 'nasxyz', 
'erx atm 13/0.1123433234:11.3602:0030292668', '192.168.21.33', 
'0x746573745f636c6173735f303031', 'Framed-User', 'PPP', 'None', 
'=23nasxyz=23A130=2311=233602', '0005681578', '2', '703351', '1', 
'7489000', '177814', '178321', 'speed:UBR:1536', 'xDSL', '3490385426', 
'atm 13/0.1123433234:11.3602', '72024', 'NAS-Request', 'RADIUS', 'L2TP', 
'1', 'IP', '192.168.25.33', 'nasxyz', '192.168.254.106', 'lau01a03', 
'mydomain.net_106', '', '', '', '')
rlm_sql (sql): Released sql socket id: 0
  modcall[accounting]: module "sql" returns ok for request 0
modcall: leaving group accounting (returns ok) for request 0
Sending Accounting-Response of id 141 to 192.168.1.35 port 49273



More information about the Freeradius-Users mailing list