Yes,I checked the entire debug output, there is no attribute about the
Acct-Input-Octets in the accounting-Request packet.
And here is my stupid question again:
How to add it?

I use the nas table in MySQL to store the information about the nas here is
the configuration:

mysql> select * from nas where id=1;
+----+---------------+-----------+-------+-------+----------+--------+-----------+---------------+
| id | nasname       | shortname | type  | ports | secret   | server |
community | description   |
+----+---------------+-----------+-------+-------+----------+--------+-----------+---------------+
|  1 | 192.168.0.143 | AP1       | other |  NULL | 12345678 | NULL   | NULL     
| RADIUS Client |
+----+---------------+-----------+-------+-------+----------+--------+-----------+---------------+
1 row in set (0.00 sec)


And Here is debug info :

rad_recv: Accounting-Request packet from host 192.168.0.143 port 3073,
id=100, length=150
        Acct-Session-Id = "386D4387-00000008"
        Acct-Status-Type = Start
        Acct-Authentic = RADIUS
        User-Name = "snan4love"
        NAS-IP-Address = 192.168.0.143
        NAS-Identifier = "AP"
        NAS-Port = 0
        Called-Station-Id = "00-80-48-6E-1A-87:143"
        Calling-Station-Id = "00-1E-65-50-D4-EA"
        NAS-Port-Type = Wireless-802.11
        Connect-Info = "CONNECT 11Mbps 802.11b"
# Executing section preacct from file /etc/raddb/sites-enabled/default
+- entering group preacct {...}
++[preprocess] returns ok
[acct_unique] Hashing 'NAS-Port = 0,Client-IP-Address =
192.168.0.143,NAS-IP-Address = 192.168.0.143,Acct-Session-Id =
"386D4387-00000008",User-Name = "snan4love"'
[acct_unique] Acct-Unique-Session-ID = "f6139abfb9132394".
++[acct_unique] returns ok
[suffix] No '@' in User-Name = "snan4love", looking up realm NULL
[suffix] No such realm "NULL"
++[suffix] returns noop
++[files] returns noop
# Executing section accounting from file /etc/raddb/sites-enabled/default
+- entering group accounting {...}
[detail]        expand: %{Packet-Src-IP-Address} -> 192.168.0.143
[detail]        expand:
/var/log/radius/radacct/%{%{Packet-Src-IP-Address}:-%{Packet-Src-IPv6-Address}}/detail-%Y%m%d
-> /var/log/radius/radacct/192.168.0.143/detail-20110927
[detail]
/var/log/radius/radacct/%{%{Packet-Src-IP-Address}:-%{Packet-Src-IPv6-Address}}/detail-%Y%m%d
expands to /var/log/radius/radacct/192.168.0.143/detail-20110927
[detail]        expand: %t -> Tue Sep 27 15:53:48 2011
++[detail] returns ok
[radutmp]       expand: /var/log/radius/radutmp -> /var/log/radius/radutmp
[radutmp]       expand: %{User-Name} -> snan4love
++[radutmp] returns ok
[sql]   expand: %{User-Name} -> snan4love
[sql] sql_set_user escaped user --> 'snan4love'
[sql]   expand: %{Acct-Delay-Time} -> 
[sql]   ... expanding second conditional
[sql]   expand:            INSERT INTO radacct             (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,    xascendsessionsvrkey)           VALUES      
      
('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}',             
'%{SQL-User-Name}',              '%{Realm}', '%{NAS-IP-Address}',
'%{NAS-Port}',              '%{NAS-Port-Type}', '%S', NULL,             
'0', '%{Acct-Authentic}', '%{Connect-Info}',              '', '0', '0',         
    
'%{Called-Station-Id}', '%{Calling-Station-Id}', '',             
'%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}',      
rlm_sql (sql): Reserving sql socket id: 3
rlm_sql (sql): Released sql socket id: 3
++[sql] returns ok
++[exec] returns noop
[attr_filter.accounting_response]       expand: %{User-Name} -> snan4love
 attr_filter: Matched entry DEFAULT at line 12
++[attr_filter.accounting_response] returns updated
Sending Accounting-Response of id 100 to 192.168.0.143 port 3073
Finished request 31.
Cleaning up request 31 ID 100 with timestamp +1832
Going to the next request
Waking up in 4.8 seconds.
Cleaning up request 21 ID 90 with timestamp +1832
Cleaning up request 22 ID 91 with timestamp +1832
Cleaning up request 23 ID 92 with timestamp +1832
Cleaning up request 24 ID 93 with timestamp +1832
Cleaning up request 25 ID 94 with timestamp +1832
Cleaning up request 26 ID 95 with timestamp +1832
Cleaning up request 27 ID 96 with timestamp +1832
Cleaning up request 28 ID 97 with timestamp +1832
Cleaning up request 29 ID 98 with timestamp +1832
Cleaning up request 30 ID 99 with timestamp +1832
Ready to process requests.
rad_recv: Accounting-Request packet from host 192.168.0.143 port 3073,
id=101, length=168
        Acct-Session-Id = "386D4387-00000008"
        Acct-Status-Type = Stop
        Acct-Authentic = RADIUS
        User-Name = "snan4love"
        NAS-IP-Address = 192.168.0.143
        NAS-Identifier = "AP"
        NAS-Port = 0
        Called-Station-Id = "00-80-48-6E-1A-87:143"
        Calling-Station-Id = "00-1E-65-50-D4-EA"
        NAS-Port-Type = Wireless-802.11
        Connect-Info = "CONNECT 11Mbps 802.11b"
        Acct-Session-Time = 2976
        Event-Timestamp = "Jan  1 2000 13:13:25 CST"
        Acct-Terminate-Cause = User-Request
# Executing section preacct from file /etc/raddb/sites-enabled/default
+- entering group preacct {...}
++[preprocess] returns ok
[acct_unique] Hashing 'NAS-Port = 0,Client-IP-Address =
192.168.0.143,NAS-IP-Address = 192.168.0.143,Acct-Session-Id =
"386D4387-00000008",User-Name = "snan4love"'
[acct_unique] Acct-Unique-Session-ID = "f6139abfb9132394".
++[acct_unique] returns ok
[suffix] No '@' in User-Name = "snan4love", looking up realm NULL
[suffix] No such realm "NULL"
++[suffix] returns noop
++[files] returns noop
# Executing section accounting from file /etc/raddb/sites-enabled/default
+- entering group accounting {...}
[detail]        expand: %{Packet-Src-IP-Address} -> 192.168.0.143
[detail]        expand:
/var/log/radius/radacct/%{%{Packet-Src-IP-Address}:-%{Packet-Src-IPv6-Address}}/detail-%Y%m%d
-> /var/log/radius/radacct/192.168.0.143/detail-20110927
[detail]
/var/log/radius/radacct/%{%{Packet-Src-IP-Address}:-%{Packet-Src-IPv6-Address}}/detail-%Y%m%d
expands to /var/log/radius/radacct/192.168.0.143/detail-20110927
[detail]        expand: %t -> Tue Sep 27 16:43:24 2011
++[detail] returns ok
[radutmp]       expand: /var/log/radius/radutmp -> /var/log/radius/radutmp
[radutmp]       expand: %{User-Name} -> snan4love
++[radutmp] returns ok
[sql]   expand: %{User-Name} -> snan4love
[sql] sql_set_user escaped user --> 'snan4love'
[sql]   expand: %{Acct-Input-Gigawords} -> 
[sql]   ... expanding second conditional
[sql]   expand: %{Acct-Input-Octets} -> 
[sql]   ... expanding second conditional
[sql]   expand: %{Acct-Output-Gigawords} -> 
[sql]   ... expanding second conditional
[sql]   expand: %{Acct-Output-Octets} -> 
[sql]   ... expanding second conditional
[sql]   expand: %{Acct-Delay-Time} -> 
[sql]   ... expanding second conditional
[sql]   expand:            UPDATE radacct SET              acctstoptime      
= '%S',              acctsessiontime    = '%{Acct-Session-Time}',             
acctinputoctets    = '%{%{Acct-Input-Gigawords}:-0}' << 32 |                    
              
'%{%{Acct-Input-Octets}:-0}',              acctoutputoctets   =
'%{%{Acct-Output-Gigawords}:-0}' << 32 |                                  
'%{%{Acct-Output-Octets}:-0}',              acctterminatecause =
'%{Acct-Terminate-Cause}',              acctstopdelay      =
'%{%{Acct-Delay-Time}:-0}',              connectinfo_stop   =
'%{Connect-Info}'           WHERE acctsessionid   = '%{Acct-Session-Id}'        
  
AND username          = '%{SQL-User-Name}'           AND nasipaddress      =
'%{NAS-IP-Address}' ->            UPDATE radacct SET             
acctstoptime       = '2011-09-27 16:43:24',              acctsessiontime   
= '2976',              acctinputoctets    = '0' << 32 |                         
         
'0',              acctoutputoctets   = '0' << 32 |   
rlm_sql (sql): Reserving sql socket id: 2
rlm_sql (sql): Released sql socket id: 2
++[sql] returns ok
++[exec] returns noop
[attr_filter.accounting_response]       expand: %{User-Name} -> snan4love
 attr_filter: Matched entry DEFAULT at line 12
++[attr_filter.accounting_response] returns updated
Sending Accounting-Response of id 101 to 192.168.0.143 port 3073
Finished request 32.
Cleaning up request 32 ID 101 with timestamp +4808
Going to the next request
Ready to process requests.


--
View this message in context: 
http://freeradius.1045715.n5.nabble.com/Problem-expand-Acct-Input-Gigawords-always-get-nothing-tp4844371p4844535.html
Sent from the FreeRadius - User mailing list archive at Nabble.com.
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to