|
|
|
|
@ -341,8 +341,8 @@ static void ncd_connect_timeout_cb(void* arg) {
|
|
|
|
|
struct ncd_entry* entry = (struct ncd_entry*)arg; |
|
|
|
|
if (!entry || entry->timed_out) return; |
|
|
|
|
entry->connect_timer = NULL; |
|
|
|
|
DEBUG_WARN(DEBUG_CATEGORY_NCD, "[ncd] connect timeout node=0x%016llx handles=%d", |
|
|
|
|
(unsigned long long)entry->node_id, entry->handle_count); |
|
|
|
|
DEBUG_WARN(DEBUG_CATEGORY_NCD, "[ncd] connect TIMEOUT: node=0x%016llx now_tb=%llu handles=%d", |
|
|
|
|
(unsigned long long)entry->node_id, (unsigned long long)get_time_tb(), entry->handle_count); |
|
|
|
|
ncd_event_dispatch(entry, NCD_EVENT_TIMEOUT); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -555,6 +555,8 @@ int node_conn_direct_open(struct UTUN_INSTANCE* inst, uint64_t node_id,
|
|
|
|
|
{ struct TOPO_NODE* ni = ncd_lookup_node(inst, node_id); |
|
|
|
|
if (ni) { ncd_create_links(entry, ni, specific_sock); topo_node_registry_unref(inst->topo_groups, ni->node_id); } |
|
|
|
|
} |
|
|
|
|
DEBUG_DEBUG(DEBUG_CATEGORY_DEBUG, "[ncd] connect timer SET: node=0x%016llx value_tb=%u now_tb=%llu path=REUSED_entry_pending", |
|
|
|
|
(unsigned long long)node_id, inst->etcp_connect_timeout_tb, (unsigned long long)get_time_tb()); |
|
|
|
|
entry->connect_timer = uasync_set_timeout(inst->ua, (int)inst->etcp_connect_timeout_tb, entry, ncd_connect_timeout_cb, "ncd_connect"); |
|
|
|
|
DEBUG_INFO(DEBUG_CATEGORY_NCD, "[ncd] open REUSED new-entry (pending) node=0x%016llx conn=%p", (unsigned long long)node_id, (void*)conn); |
|
|
|
|
} |
|
|
|
|
@ -627,6 +629,8 @@ int node_conn_direct_open(struct UTUN_INSTANCE* inst, uint64_t node_id,
|
|
|
|
|
if (link_count == 0) |
|
|
|
|
DEBUG_WARN(DEBUG_CATEGORY_NCD, "[ncd] no links created for node=0x%016llx", (unsigned long long)node_id); |
|
|
|
|
|
|
|
|
|
DEBUG_DEBUG(DEBUG_CATEGORY_DEBUG, "[ncd] connect timer SET: node=0x%016llx value_tb=%u now_tb=%llu path=NEW_node_conn_direct_open", |
|
|
|
|
(unsigned long long)node_id, inst->etcp_connect_timeout_tb, (unsigned long long)get_time_tb()); |
|
|
|
|
entry->connect_timer = uasync_set_timeout(inst->ua, (int)inst->etcp_connect_timeout_tb, entry, ncd_connect_timeout_cb, "ncd_connect"); |
|
|
|
|
DEBUG_INFO(DEBUG_CATEGORY_NCD, "[ncd] open NEW node=0x%016llx conn=%p links=%d handles=%d", |
|
|
|
|
(unsigned long long)node_id, (void*)conn, link_count, entry->handle_count); |
|
|
|
|
@ -702,6 +706,8 @@ int node_conn_direct_open_node(struct UTUN_INSTANCE* inst, uint64_t node_id,
|
|
|
|
|
DEBUG_INFO(DEBUG_CATEGORY_NCD, "[ncd] open_node REUSED new-entry (ready) node=0x%016llx conn=%p", (unsigned long long)node_id, (void*)conn); |
|
|
|
|
} else { |
|
|
|
|
ncd_create_links(entry, ni, specific_sock); |
|
|
|
|
DEBUG_DEBUG(DEBUG_CATEGORY_DEBUG, "[ncd] connect timer SET: node=0x%016llx value_tb=%u now_tb=%llu path=REUSED_conn_pending", |
|
|
|
|
(unsigned long long)node_id, inst->etcp_connect_timeout_tb, (unsigned long long)get_time_tb()); |
|
|
|
|
entry->connect_timer = uasync_set_timeout(inst->ua, (int)inst->etcp_connect_timeout_tb, entry, ncd_connect_timeout_cb, "ncd_connect_node"); |
|
|
|
|
DEBUG_INFO(DEBUG_CATEGORY_NCD, "[ncd] open_node REUSED new-entry (pending) node=0x%016llx conn=%p", (unsigned long long)node_id, (void*)conn); |
|
|
|
|
} |
|
|
|
|
@ -765,6 +771,8 @@ int node_conn_direct_open_node(struct UTUN_INSTANCE* inst, uint64_t node_id,
|
|
|
|
|
if (link_count == 0) |
|
|
|
|
DEBUG_WARN(DEBUG_CATEGORY_NCD, "[ncd] open_node no links created for node=0x%016llx", (unsigned long long)node_id); |
|
|
|
|
|
|
|
|
|
DEBUG_DEBUG(DEBUG_CATEGORY_DEBUG, "[ncd] connect timer SET: node=0x%016llx value_tb=%u now_tb=%llu path=NEW_node_conn_direct_open_node", |
|
|
|
|
(unsigned long long)node_id, inst->etcp_connect_timeout_tb, (unsigned long long)get_time_tb()); |
|
|
|
|
entry->connect_timer = uasync_set_timeout(inst->ua, (int)inst->etcp_connect_timeout_tb, entry, ncd_connect_timeout_cb, "ncd_connect_node"); |
|
|
|
|
DEBUG_INFO(DEBUG_CATEGORY_NCD, "[ncd] open_node NEW node=0x%016llx conn=%p links=%d handles=%d", |
|
|
|
|
(unsigned long long)node_id, (void*)conn, link_count, entry->handle_count); |
|
|
|
|
|