Cleanup DHCP packets immediately
authorAlan T. DeKok <aland@freeradius.org>
Fri, 27 Mar 2015 17:06:40 +0000 (12:06 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 27 Mar 2015 17:11:16 +0000 (12:11 -0500)
src/main/process.c

index 416acda..872b19f 100644 (file)
@@ -809,6 +809,13 @@ static void request_cleanup_delay_init(REQUEST *request)
        if (request->listener->type == RAD_LISTEN_DETAIL) goto done;
 #endif
 
+#ifdef WITH_DHCP
+       /*
+        *      If the packets are from the DHCP, we can clean them up now.
+        */
+       if (request->listener->type == RAD_LISTEN_DHCP) goto done;
+#endif
+
        if (!request->root->cleanup_delay) goto done;
 
        gettimeofday(&now, NULL);
@@ -1422,6 +1429,17 @@ static void request_finish(REQUEST *request, int action)
                }
 #endif
 
+#ifdef WITH_DHCP
+               /*
+                *      If the packets are from DHCP, we can clean them up now.
+                */
+               if (request->listener->type == RAD_LISTEN_DHCP) {
+                       NO_CHILD_THREAD;
+                       request->child_state = REQUEST_DONE;
+                       return;
+               }
+#endif
+
 #ifdef WITH_COA
                /*
                 *      If we've originated this CoA request, it gets