]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
don't count status server requests in internal stats 212/head
authorJakob Hirsch <jh@plonk.de>
Wed, 6 Mar 2013 17:34:52 +0000 (18:34 +0100)
committerJakob Hirsch <jh@plonk.de>
Wed, 6 Mar 2013 17:34:52 +0000 (18:34 +0100)
Requests to to status server should not be added to the internal counters,
notably the Access-Accept replies. See also the thread in
http://lists.freeradius.org/pipermail/freeradius-devel/2013-March/007801.html

src/main/stats.c

index 4604d04c9703f9b9458b54f4879a1c1b23947eba..21af78b719d91fabd88a09aea7a612c4e7634e8e 100644 (file)
@@ -127,6 +127,10 @@ void request_stats_final(REQUEST *request)
 #endif
            (request->listener->type != RAD_LISTEN_AUTH)) return;
 
+       /* don't count statistic requests */
+       if (request->packet->code == PW_STATUS_SERVER)
+               return;
+
 #undef INC_AUTH
 #define INC_AUTH(_x) radius_auth_stats._x++;request->listener->stats._x++;request->client->auth._x++;