]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
fail if there's no resume function
authorAlan T. DeKok <aland@freeradius.org>
Wed, 8 Nov 2017 16:56:28 +0000 (11:56 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 8 Nov 2017 16:56:28 +0000 (11:56 -0500)
src/main/unlang_interpret.c

index 51129b02716e91ee94b5803fc5451decbaa199d0..a29e02f0dbf0291e0ae367cc753d970eaa6bc182 100644 (file)
@@ -1896,6 +1896,11 @@ static unlang_action_t unlang_resume(REQUEST *request,
 
        RDEBUG3("Resuming in %s", mr->self.debug_name);
 
+       if (!unlang_ops_resume[mr->parent_type]) {
+               *presult = RLM_MODULE_FAIL;
+               return UNLANG_ACTION_CALCULATE_RESULT;
+       }
+
        memcpy(&instance, &mr->instance, sizeof(instance));
        request->module = mr->self.debug_name;
 
@@ -1904,10 +1909,8 @@ static unlang_action_t unlang_resume(REQUEST *request,
         *      the original frame which was used to
         *      create this resumption frame.
         */
-       if (unlang_ops_resume[mr->parent_type]) {
-               *presult = request->rcode = unlang_ops_resume[mr->parent_type](request, instance,
-                                                                              mr->thread, mr->resume_ctx);
-       }
+       *presult = request->rcode = unlang_ops_resume[mr->parent_type](request, instance,
+                                                                      mr->thread, mr->resume_ctx);
 
        request->module = NULL;