]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Better checks for duplicates.
authorAlan T. DeKok <aland@freeradius.org>
Mon, 3 Nov 2014 13:47:47 +0000 (08:47 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 3 Nov 2014 13:48:52 +0000 (08:48 -0500)
If the old packet is in RESPONSE_DELAY or CLEANUP_DELAY,
we can delete the old packet.  This is really only for DHCP.

src/main/process.c

index 8788e2d4cb8eaea5ba956844689c0fe8aa724d50..a9176467d82b83141aec0c3600a4e00cad07e130 100644 (file)
@@ -1483,6 +1483,9 @@ STATE_MACHINE_DECL(request_finish)
                pairfree(&request->reply->vps);
 
                RDEBUG2("Finished request");
+               request->component = "<core>";
+               request->module = "<done>";
+
 #ifdef WITH_ACCOUNTING
                if (request->packet->code == PW_CODE_ACCOUNTING_REQUEST) {
                        NO_CHILD_THREAD;
@@ -1656,9 +1659,12 @@ int request_receive(rad_listen_t *listener, RADIUS_PACKET *packet,
                            sizeof(packet->vector)) == 0)) {
 
                        /*
-                        *      If the request is running, it'
+                        *      If the request is running, don't muck
+                        *      with it.
                         */
-                       if (request->child_state != REQUEST_DONE) {
+                       if ((request->child_state != REQUEST_DONE) &&
+                           (request->child_state != REQUEST_RESPONSE_DELAY) &&
+                           (request->child_state != REQUEST_CLEANUP_DELAY)) {
                                request->process(request, FR_ACTION_DUP);
 
 #ifdef WITH_STATS