]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
all external requests MUST have a listener
authorAlan T. DeKok <aland@freeradius.org>
Fri, 2 Apr 2021 10:21:41 +0000 (06:21 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Sat, 3 Apr 2021 12:26:48 +0000 (08:26 -0400)
the listener is only cleaned up when the worker side informs
the network side that all outstanding requests are finished.

src/lib/io/worker.c

index bbd7e6446ca6828466302eafc62a7cf615e8b418..4cf454fdb0fc8a3b142f3a4c97b202531f4b88be 100644 (file)
@@ -970,11 +970,16 @@ static void _worker_request_external_done(request_t *request, UNUSED rlm_rcode_t
 {
        fr_worker_t     *worker = uctx;
 
+       /*
+        *      All external requests MUST have a listener.
+        */
+       fr_assert(request->async->listen != NULL);
+
        /*
         *      Only real packets are in the dedup tree.  And even
         *      then, only some of the time.
         */
-       if (request->async->listen && request->async->listen->track_duplicates) {
+       if (request->async->listen->track_duplicates) {
                (void) rbtree_delete_by_data(worker->dedup, request);
        }