Evgeny 4 days ago
parent
commit
d3c4b5f6e7
  1. 7
      src/route_bgp.c
  2. 4
      src/routing.c

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

4
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);

Loading…
Cancel
Save