diff --git a/example/dictionary.freeradius b/example/dictionary.freeradius index 544d0d7..2a0ef55 100644 --- a/example/dictionary.freeradius +++ b/example/dictionary.freeradius @@ -34,4 +34,58 @@ VALUE FreeRADIUS-Statistics-Type Proxy-Auth-Acct 0x0c VALUE FreeRADIUS-Statistics-Type All 0x1f -END-VENDOR FreeRADIUS \ No newline at end of file +# +# FreeRADIUS statistic result attributes +# +ATTRIBUTE FreeRADIUS-Total-Access-Requests 128 integer +ATTRIBUTE FreeRADIUS-Total-Access-Accepts 129 integer +ATTRIBUTE FreeRADIUS-Total-Access-Rejects 130 integer +ATTRIBUTE FreeRADIUS-Total-Access-Challenges 131 integer +ATTRIBUTE FreeRADIUS-Total-Auth-Responses 132 integer +ATTRIBUTE FreeRADIUS-Total-Auth-Duplicate-Requests 133 integer +ATTRIBUTE FreeRADIUS-Total-Auth-Malformed-Requests 134 integer +ATTRIBUTE FreeRADIUS-Total-Auth-Invalid-Requests 135 integer +ATTRIBUTE FreeRADIUS-Total-Auth-Dropped-Requests 136 integer +ATTRIBUTE FreeRADIUS-Total-Auth-Unknown-Types 137 integer + +ATTRIBUTE FreeRADIUS-Total-Proxy-Access-Requests 138 integer +ATTRIBUTE FreeRADIUS-Total-Proxy-Access-Accepts 139 integer +ATTRIBUTE FreeRADIUS-Total-Proxy-Access-Rejects 140 integer +ATTRIBUTE FreeRADIUS-Total-Proxy-Access-Challenges 141 integer +ATTRIBUTE FreeRADIUS-Total-Proxy-Auth-Responses 142 integer +ATTRIBUTE FreeRADIUS-Total-Proxy-Auth-Duplicate-Requests 143 integer +ATTRIBUTE FreeRADIUS-Total-Proxy-Auth-Malformed-Requests 144 integer +ATTRIBUTE FreeRADIUS-Total-Proxy-Auth-Invalid-Requests 145 integer +ATTRIBUTE FreeRADIUS-Total-Proxy-Auth-Dropped-Requests 146 integer +ATTRIBUTE FreeRADIUS-Total-Proxy-Auth-Unknown-Types 147 integer + +ATTRIBUTE FreeRADIUS-Total-Accounting-Requests 148 integer +ATTRIBUTE FreeRADIUS-Total-Accounting-Responses 149 integer +ATTRIBUTE FreeRADIUS-Total-Acct-Duplicate-Requests 150 integer +ATTRIBUTE FreeRADIUS-Total-Acct-Malformed-Requests 151 integer +ATTRIBUTE FreeRADIUS-Total-Acct-Invalid-Requests 152 integer +ATTRIBUTE FreeRADIUS-Total-Acct-Dropped-Requests 153 integer +ATTRIBUTE FreeRADIUS-Total-Acct-Unknown-Types 154 integer + +ATTRIBUTE FreeRADIUS-Total-Proxy-Accounting-Requests 155 integer +ATTRIBUTE FreeRADIUS-Total-Proxy-Accounting-Responses 156 integer +ATTRIBUTE FreeRADIUS-Total-Proxy-Acct-Duplicate-Requests 157 integer +ATTRIBUTE FreeRADIUS-Total-Proxy-Acct-Malformed-Requests 158 integer +ATTRIBUTE FreeRADIUS-Total-Proxy-Acct-Invalid-Requests 159 integer +ATTRIBUTE FreeRADIUS-Total-Proxy-Acct-Dropped-Requests 160 integer +ATTRIBUTE FreeRADIUS-Total-Proxy-Acct-Unknown-Types 161 integer + +ATTRIBUTE FreeRADIUS-Queue-Len-Internal 162 integer +ATTRIBUTE FreeRADIUS-Queue-Len-Proxy 163 integer +ATTRIBUTE FreeRADIUS-Queue-Len-Auth 164 integer +ATTRIBUTE FreeRADIUS-Queue-Len-Acct 165 integer +ATTRIBUTE FreeRADIUS-Queue-Len-Detail 166 integer + +ATTRIBUTE FreeRADIUS-Stats-Start-Time 176 date +ATTRIBUTE FreeRADIUS-Stats-HUP-Time 177 date + +ATTRIBUTE FreeRADIUS-Queue-PPS-In 181 integer +ATTRIBUTE FreeRADIUS-Queue-PPS-In 182 integer + + +END-VENDOR FreeRADIUS diff --git a/pyrad/client_async.py b/pyrad/client_async.py index 24b7c24..e9d5df3 100644 --- a/pyrad/client_async.py +++ b/pyrad/client_async.py @@ -121,7 +121,7 @@ def datagram_received(self, data, addr): try: reply = Packet(packet=data, dict=self.client.dict) - if reply and reply.id in self.pending_requests: + if reply.code and reply.id in self.pending_requests: req = self.pending_requests[reply.id] packet = req['packet']