]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Allow the transition from CANCEL to CANCEL_COMPLETE
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 26 Jul 2022 15:50:23 +0000 (23:50 +0800)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 26 Jul 2022 15:50:49 +0000 (23:50 +0800)
src/lib/server/trunk.c

index d602b8315686d6f2e1e0e6b113bf87497c2911f2..23b467b9b12b5cd311fa16b63868160086c2bcf6 100644 (file)
@@ -2184,6 +2184,19 @@ void fr_trunk_request_signal_cancel_complete(fr_trunk_request_t *treq)
 
        switch (treq->pub.state) {
        case FR_TRUNK_REQUEST_STATE_CANCEL_SENT:
+       /*
+        *      This is allowed, as we may not need to wait
+        *      for the database to ACK our cancellation
+        *      request.
+        *
+        *      Note: FR_TRUNK_REQUEST_STATE_CANCEL_PARTIAL
+        *      is not allowed here, as that'd mean we'd half
+        *      written the cancellation request out to the
+        *      socket, and then decided to abandon it.
+        *
+        *      That'd leave the socket in an unusable state.
+        */
+       case FR_TRUNK_REQUEST_STATE_CANCEL:
                trunk_request_enter_cancel_complete(treq);
                break;