]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Don't store session state for child requests
authorNick Porter <nick@portercomputing.co.uk>
Tue, 5 Nov 2024 08:52:48 +0000 (08:52 +0000)
committerNick Porter <nick@portercomputing.co.uk>
Tue, 5 Nov 2024 10:13:54 +0000 (10:13 +0000)
This allows the parent request to use fr_state_store_in_parent to store
the child's session state.

src/process/radius/base.c

index 8755c7c117e1b41ced8d7fd5be754f55abc5282e..62f561c12cac67b51ec98695789b7f46a9367675 100644 (file)
@@ -592,11 +592,12 @@ RESUME(access_challenge)
        PROCESS_TRACE;
 
        /*
-        *      Cache the state context.
+        *      Cache the state context, unless this is a subrequest.
+        *      Subrequest state context will be handled by the caller.
         *
         *      If this fails, don't respond to the request.
         */
-       if (fr_request_to_state(inst->auth.state_tree, request) < 0) {
+       if (!request->parent && fr_request_to_state(inst->auth.state_tree, request) < 0) {
                return CALL_SEND_TYPE(FR_RADIUS_CODE_DO_NOT_RESPOND);
        }