Browse code

dispatcher: Not possible to deactivate probing of destination by reload

If ds_probing_mode is set to 3, flag in the dispatcher entry needs to include 8
for probing to happen.

Changing a destination to not include this anymore while the destination do
not respond to OPTIONS will cause the probing flag to be re-added because of the
delayed response. A restart will fix it.

We need to check against the probing flag in the CB function to determine if
we should continue probing this destination. If probing is deativated while
waiting for a reply, we should abort.

(cherry picked from commit 429fea8069f0753e6b8dbfbfaf36701e30af6dda)

Morten Tryfoss authored on 27/11/2021 20:14:41 • Daniel-Constantin Mierla committed on 06/12/2021 13:24:28
Showing 1 changed files
... ...
@@ -3503,6 +3503,11 @@ static void ds_options_callback(
3503 3503
 		}
3504 3504
 	}
3505 3505
 
3506
+	/* Check if in the meantime someone disabled probing of the target through RPC, MI or reload */
3507
+	if(ds_probing_mode == DS_PROBE_ONLYFLAGGED && !(ds_get_state(group, &uri) & DS_PROBING_DST)) {
3508
+		return;
3509
+	}
3510
+
3506 3511
 	/* ps->code contains the result-code of the request.
3507 3512
 	 *
3508 3513
 	 * We accept both a "200 OK" or the configured reply as a valid response */