]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Be more careful when originating CoA requests
authorAlan T. DeKok <aland@freeradius.org>
Thu, 28 May 2015 16:07:46 +0000 (12:07 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 28 May 2015 16:07:46 +0000 (12:07 -0400)
And document the process a bit more

src/main/process.c

index 83acc46a83b4039dbc9a11648856cc79af5ec65d..a20ea982504fcaa7d174ccbf17608725b219b0fd 100644 (file)
@@ -4109,8 +4109,6 @@ static void request_coa_originate(REQUEST *request)
                               child_state_names[REQUEST_PROXIED]);
 #endif
 
-       if (we_are_master()) coa_separate(request->coa);
-
        /*
         *      Set the state function, then the state, no child, and
         *      send the packet.
@@ -4127,7 +4125,7 @@ static void request_coa_originate(REQUEST *request)
         */
        coa->proxy_listener->send(coa->proxy_listener, coa);
 
-       request_queue_or_run(coa, coa->process);
+       if (we_are_master()) coa_separate(request->coa);
 }
 
 
@@ -4323,6 +4321,11 @@ static void coa_separate(REQUEST *request)
        (void) talloc_steal(NULL, request);
        request->parent->coa = NULL;
        request->parent = NULL;
+
+       if (we_are_master()) {
+               request->delay = 0;
+               coa_retransmit(request);
+       }
 }