fix: memory pool alloc mismatch in tests, db_sync SEND_DATA buffer overflow

- test_etcp_router_reconnect, test_etcp_connect, test_stcp_traffic:
  replace u_calloc with memory_pool_alloc for TOPO_SOCKMETA4/TOPO_ADDR4
- db_sync.c: fix req[14] -> req[15] — SEND_DATA request header is 15 bytes
  (type:1 + from:4 + count:2 + vp:4 + want_from:4)
This commit is contained in:
evgeny committed 2026-07-31 21:44:44 +03:00
1 parent fe9be74e29
commit d310bccf08
52 files changed
+1796 -585

No files matched your search

+3 -3
View File
@@ -48,7 +48,7 @@ FDxx/8 - опциональные ipv6 подсети узлов /64 (если
struct ROUTE6_DATA {
struct radix_node rn_nodes[2]; // scratch-буфер для rn_addroute
struct TOPO_NODEQ *v_node_info; // узел-владелец
struct TOPO_GROUP_NODE *v_node_info; // узел-владелец
uint64_t node_id; // ключ для hash-поиска в ll_queue
uint8_t prefix_length; // 0..128
uint8_t key[17]; // sockaddr-like: {len=17, addr[16]}
@@ -66,8 +66,8 @@ struct ROUTE6_TABLE {
struct ROUTE6_TABLE *route6_table_create(struct UASYNC *ua);
void route6_table_destroy(struct ROUTE6_TABLE *table);
bool route6_insert(struct ROUTE6_TABLE *table, struct TOPO_NODEQ *node);
void route6_delete(struct ROUTE6_TABLE *table, struct TOPO_NODEQ *node);
bool route6_insert(struct ROUTE6_TABLE *table, struct TOPO_GROUP_NODE *node);
void route6_delete(struct ROUTE6_TABLE *table, struct TOPO_GROUP_NODE *node);
const struct ROUTE6_DATA *route6_lookup(struct ROUTE6_TABLE *table, const uint8_t addr[16]);