]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Increment timeouts for CoA packets, too
authorAlan T. DeKok <aland@freeradius.org>
Fri, 23 Oct 2015 16:43:14 +0000 (12:43 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 23 Oct 2015 16:44:55 +0000 (12:44 -0400)
src/main/process.c

index 14cc3b0405756a45b33aa678a7cda44b2f96032d..0f0312650ea3a3b4db555d95b7a8cd2fc774a032 100644 (file)
@@ -2568,6 +2568,8 @@ int request_proxy_reply(RADIUS_PACKET *packet)
 
 #ifdef WITH_ACCOUNTING
        case PW_CODE_ACCOUNTING_REQUEST:
+               proxy_acct_stats.last_packet = packet->timestamp.tv_sec;
+
                request->proxy_listener->stats.total_responses++;
                proxy_acct_stats.last_packet = packet->timestamp.tv_sec;
                break;
@@ -3930,6 +3932,17 @@ static void proxy_wait_for_reply(REQUEST *request, int action)
                        FR_STATS_TYPE_INC(proxy_acct_stats.total_timeouts);
                }
 #endif
+#ifdef WITH_COA
+               else if (home->type == HOME_TYPE_COA) {
+                       if (request->proxy_listener) FR_STATS_TYPE_INC(request->proxy_listener->stats.total_timeouts);
+
+                       if (request->packet->code == PW_CODE_COA_REQUEST) {
+                               FR_STATS_TYPE_INC(proxy_coa_stats.total_timeouts);
+                       } else {
+                               FR_STATS_TYPE_INC(proxy_dsc_stats.total_timeouts);
+                       }
+               }
+#endif
 
                /*
                 *      There was no response within the window.  Stop