From d3c4b5f6e73dd23844d5678c40863e4f636904c6 Mon Sep 17 00:00:00 2001 From: Evgeny Date: Mon, 30 Mar 2026 20:07:04 +0300 Subject: [PATCH] 1 --- src/route_bgp.c | 7 ++++--- src/routing.c | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/route_bgp.c b/src/route_bgp.c index e407139..546cdc2 100644 --- a/src/route_bgp.c +++ b/src/route_bgp.c @@ -418,7 +418,7 @@ int route_bgp_add_path(struct NODEINFO_Q* nq, struct ETCP_CONN* conn, uint64_t* return -1; } if (!nq->paths) { - nq->paths = queue_new(conn->instance->ua, 32, "node_paths"); + nq->paths = queue_new(conn->instance->ua, 0, "node_paths"); if (!nq->paths) return -1; } size_t hop_size = hop_count * 8; @@ -534,8 +534,9 @@ int route_bgp_process_nodeinfo(struct ROUTE_BGP* bgp, struct ETCP_CONN* from, return -1; } existing = (struct NODEINFO_Q*)entry; - existing->paths = queue_new(bgp->instance->ua, 32, "node_paths"); - queue_data_put_with_index(bgp->nodes, entry, offsetof(struct NODEINFO_Q, node.node_id), 8); + existing->paths = queue_new(bgp->instance->ua, 0, "node_paths"); + queue_data_put(bgp->nodes, entry); +// queue_data_put_with_index(bgp->nodes, entry, offsetof(struct NODEINFO_Q, node.node_id)-sizeof(struct ll_entry), 8); } memcpy(&existing->node, ni, sizeof(struct NODEINFO)); diff --git a/src/routing.c b/src/routing.c index 009f558..b781e86 100644 --- a/src/routing.c +++ b/src/routing.c @@ -151,8 +151,8 @@ static void route_pkt(struct UTUN_INSTANCE* instance, struct ll_entry* entry, ui conn = (struct ETCP_CONN*)path_entry->data; } if (!conn) { - DEBUG_WARN(DEBUG_CATEGORY_ROUTING, "route_pkt: no path for node %016llx", - (unsigned long long)nq->node.node_id); + EBUG_WARN(DEBUG_CATEGORY_ROUTING, "route_pkt: no path for node %016llx dst=%s conn=%s", + nq->node.node_id, ip_to_str(&addr, AF_INET).str, conn ? conn->log_name : "null"); instance->dropped_packets++; queue_entry_free(entry); queue_dgram_free(entry);