When not responding, wait longer for cleanups.
authorAlan T. DeKok <aland@freeradius.org>
Wed, 29 Apr 2009 15:02:11 +0000 (17:02 +0200)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 29 Apr 2009 15:02:11 +0000 (17:02 +0200)
wait max_request_time, not cleanup_delay to clean up packets
that we're not responding to.  This means that we don't clean up
after 5s, and the re-process the packet.

Instead, we just look at the cached packet, and don't respond

src/main/event.c

index 60d8efa..e9a149a 100644 (file)
@@ -2262,10 +2262,20 @@ static void request_post_handler(REQUEST *request)
                                RDEBUG2("There was no response configured: rejecting request %d",
                                       request->number);
                                request->reply->code = PW_AUTHENTICATION_REJECT;
+
                        } else if (vp->vp_integer == 256) {
                                RDEBUG2("Not responding to request %d",
                                       request->number);
 
+                               /*
+                                *      Force cleanup after a long
+                                *      time, so that we don't
+                                *      re-process the packet.
+                                */
+                               request->next_when.tv_sec += request->root->max_request_time;
+                               request->next_callback = cleanup_delay;
+                               child_state = REQUEST_CLEANUP_DELAY;
+                               break;
                        } else {
                                request->reply->code = vp->vp_integer;