Keep local CM demand after stale control and reject zero requests
This commit is contained in:
1 parent
182fb97970
commit
00a85a1468
2 files changed
+16
-3
No files matched your search
@@ -17,6 +17,7 @@ void cm_start_phase_indirect(struct CONN_MGR_ENTRY* entry) {
|
||||
struct CONN_MGR* mgr = entry->mgr;
|
||||
if (!entry->indirect_started) {
|
||||
entry->indirect_started = 1; entry->exchange_request_id = ++mgr->next_request_id;
|
||||
if (!entry->exchange_request_id) entry->exchange_request_id = ++mgr->next_request_id;
|
||||
DEBUG_INFO(DEBUG_CATEGORY_GENERAL, "conn_mgr: INDIRECT start peer=%016llx elapsed=%llums candidates=%u",
|
||||
(unsigned long long)entry->node_id, (unsigned long long)((get_time_tb() - entry->start_tb) / 10),
|
||||
mgr->best_candidate_count);
|
||||
@@ -185,7 +186,8 @@ void cm_handle_interm_ack(struct CONN_MGR* mgr, uint64_t src, const uint8_t* dat
|
||||
|
||||
void cm_handle_interm_exchange_req(uint64_t src, struct CONN_MGR* mgr, struct CM_EXCHANGE_REQ* req) {
|
||||
if (!mgr) return;
|
||||
if (req->candidate_count > CONN_MGR_MAX_CANDIDATES || !topo_node_registry_find(mgr->instance->topo_groups, src)) {
|
||||
if (!req->request_id || !src || src == mgr->instance->node_id || req->candidate_count > CONN_MGR_MAX_CANDIDATES ||
|
||||
!topo_node_registry_find(mgr->instance->topo_groups, src)) {
|
||||
DEBUG_WARN(DEBUG_CATEGORY_GENERAL, "conn_mgr: invalid EXCHANGE_REQ peer=%016llx count=%u", (unsigned long long)src, req->candidate_count);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user