etcp_router: при no route выводить список узлов группы (<10)
This commit is contained in:
1 parent
614b475c86
commit
f0e221ac98
1 file changed
+13
-2
@@ -969,10 +969,21 @@ static void router_forward_transit(struct UTUN_INSTANCE* inst, struct ll_entry*
|
||||
struct TOPO_GROUP* group = topo_groups_find(inst->topo_groups, hdr->group_id);
|
||||
struct ETCP_CONN* next = topo_group_find_conn_for_node(group, hdr->dst_node_id);
|
||||
if (!next) {
|
||||
int node_count = group && group->nodes ? queue_entry_count(group->nodes) : -1;
|
||||
DEBUG_WARN(DEBUG_CATEGORY_ETCPROUTE, "etcp_router: no route to %016llx svc_id=%u, dropping (group=%016llx nodes=%d)",
|
||||
(unsigned long long)hdr->dst_node_id, hdr->svc_id,
|
||||
(unsigned long long)hdr->group_id,
|
||||
group && group->nodes ? queue_entry_count(group->nodes) : -1);
|
||||
(unsigned long long)hdr->group_id, node_count);
|
||||
if (group && group->nodes && node_count > 0 && node_count < 10) {
|
||||
char list[512]; int pos = 0;
|
||||
struct ll_entry* e = group->nodes->head;
|
||||
while (e) {
|
||||
struct TOPO_GROUP_NODE* nq = (struct TOPO_GROUP_NODE*)e;
|
||||
pos += snprintf(list + pos, sizeof(list) - pos, "%s%016llx(up=%02x)",
|
||||
pos ? "," : "", (unsigned long long)nq->node_id, nq->conn_up);
|
||||
e = e->next;
|
||||
}
|
||||
DEBUG_WARN(DEBUG_CATEGORY_ETCPROUTE, "etcp_router: group nodes: %s", list);
|
||||
}
|
||||
free_entry(entry); return;
|
||||
}
|
||||
struct TRANSIT_QUEUE* tq = transit_queue_find(next, hdr->group_id, hdr->src_node_id, hdr->dst_node_id);
|
||||
|
||||
Reference in new issue
Block a user