Browse Source

add etcp_router INFO logs for ICMP_PROXY reply path (send+deliver)

congestion
Evgeny 5 months ago
parent
commit
67d57c9751
  1. 11
      src/etcp_router.c

11
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);
}

Loading…
Cancel
Save