From 67d57c9751488f9e45571add8fdf602711d5fb36 Mon Sep 17 00:00:00 2001 From: Evgeny Date: Tue, 12 May 2026 22:45:57 +0300 Subject: [PATCH] add etcp_router INFO logs for ICMP_PROXY reply path (send+deliver) --- src/etcp_router.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/etcp_router.c b/src/etcp_router.c index ea00c652..9014a812 100644 --- a/src/etcp_router.c +++ b/src/etcp_router.c @@ -44,6 +44,9 @@ static void etcp_router_recv_cb(struct ETCP_CONN* conn, struct ll_entry* entry) (unsigned long long)(*(uint64_t*)(entry->dgram + 10))); queue_entry_free(entry); queue_dgram_free(entry); inst->router_bindings.callbacks[svc_id](conn, svc_entry); + if (svc_id == ETCP_ID_ICMP_PROXY) + DEBUG_INFO(DEBUG_CATEGORY_ETCP, "etcp_router: ICMP_PROXY reply delivered to handler self=%016llx", + (unsigned long long)inst->node_id); } else { struct ETCP_CONN* next = route_bgp_find_conn_for_node(inst->bgp, dst_node_id); if (!next) { @@ -142,7 +145,11 @@ int etcp_route_send(struct UTUN_INSTANCE* inst, uint64_t dst_node_id, struct ll_ queue_entry_free(new_entry); queue_dgram_free(new_entry); return -1; } - DEBUG_TRACE(DEBUG_CATEGORY_ETCP, "etcp_route_send: svc_id=%u → %016llx via %s len=%zu", - svc_id, (unsigned long long)dst_node_id, conn->log_name, total_len); + if (svc_id == ETCP_ID_ICMP_PROXY) + DEBUG_INFO(DEBUG_CATEGORY_ETCP, "etcp_router: ICMP_PROXY reply sent %zu bytes → %016llx via %s", + total_len, (unsigned long long)dst_node_id, conn->log_name); + else + DEBUG_TRACE(DEBUG_CATEGORY_ETCP, "etcp_route_send: svc_id=%u → %016llx via %s len=%zu", + svc_id, (unsigned long long)dst_node_id, conn->log_name, total_len); return etcp_send(conn, new_entry); }