Evgeny
|
910cac8dce
|
refactor: separate NAT detection from topology into standalone nat_detection module
- Extract NAT detection logic (~250 lines) from topo_group.c into new nat_detection.c
- NAT_DETECTION struct owns ping_pending, next_ping_req_id, allow_nat_check_local (removed from TOPO_GROUP)
- route_ping.* signatures changed: TOPO_GROUP* -> NAT_DETECTION* (+ TOPO_GROUP* where needed)
- topo_group.c now only dispatches BGP subcommands to nat_detection_* handlers
- UTUN_INSTANCE gets struct NAT_DETECTION* nat_det field (init/destroy in topo_groups_init/destroy)
- External callers (etcp_connections, etcp, control_server) call nat_detection_* directly
- nat_detection_cancel_for_conn / nat_detection_send_nat_info / nat_detection_link_ready / nat_detection_request_check_all
- route_ping_destroy_pending properly implemented (was dead code)
- TOPO_SUBCMD_PING_REQ/RESP moved from route_ping.h to topo_group.h (all BGP subcommands in one place)
- Tests updated: test_nat_detection, test_route_ping - both PASSED
- Build: auto(CORE_SOURCES+libutun) and cmake(chatgui/libutun)
|
3 months ago |
Evgeny
|
8180676120
|
fix: peers table schema mismatch causing silent member write failures
chat_core_ensure_channel_ready() created peers_<ch_id> with 7 columns
while topo_node_sqlite_member_put() INSERT expected 9 (name, creator_sig).
Fixed schema alignment + reordered calls in create_channel() so
topo_node_sqlite_channel_put() (full 11-column schema) runs first.
Added error logging to all 6 member_put/member_sync_put call sites.
|
3 months ago |
Evgeny
|
3d04c37f56
|
stcp: add on_close callback to stcp_server_create/stcp_client_connect; member_sync: add join_ts/update_sig/update_ts fields, verify update_sig in apply; topo_node_sqlite: add join_ts/update_sig/update_ts to member_put, add member_get_join, add node_update_verified; chat_sync: include join_ts in join_msg, add update_sig/update_ts to CHANNEL_INFO_RESP; WELCOME verify join_sig; tests: use generated node_ids, reduce max ticks
|
3 months ago |
Evgeny
|
895eb0abbf
|
Убрал спам-логи ETCP SEND/RECV/DECRYPT OK + добавил диагностику синхронизации мемберов (DEBUG_CATEGORY_DEBUG) в ключевые точки topo_group, merkle_sync, member_sync, chat_sync
|
3 months ago |
Evgeny
|
ccd25813f6
|
refactor: extract merkle_sync — universal Merkle-tree sync module
- merkle_sync.h/c: tree (5-level prefix, SHA256 buckets), wire protocol
(HASHES/REQUEST/BATCH), sessions (10s timeout, 3 retries), async API
with done_cb
- member_sync: thin glue layer, implements 3 data model callbacks
(update_bucket_hash, get_items, apply_items) for chat members
- chat_sync: updated member_sync_start() calls with done_cb callback
- member_tree_hash table renamed to merkle_tree_hash
- member_sync.h public API preserved, internal tree/wire logic removed
|
3 months ago |
Evgeny
|
cca3511503
|
fix: replace deprecated SHA256 API with EVP, conditional dl linkage for Windows
|
3 months ago |
Evgeny
|
d70cdbb040
|
chatgui: preserve active channel selection on reload, members sync, profile settings, member list model
|
3 months ago |