topo: invite вынесен в topo_group_invite, conn_mgr упрощён до 3-фазного open; member_sync: полный пересчёт merkle-дерева при старте
- topo_group_invite.c/h: invite/join через DIRECT + INVITE_INFO_REQ/RESP (из conn_mgr) - conn_mgr: conn_mgr_open_invite → conn_mgr_open, убран invite-режим (-480 строк) - topo_group_connect: подключение через node_conn_direct вместо conn_mgr - member_sync: _rebuild_all_trees сносит merkle_tree_hash канала и собирает заново из peers (чистка осиротевших листов) - member_sync: хеш блока A/B (update_sig/adm_tags) в док-комментариях - обновлены doc-файлы и тесты
This commit is contained in:
1 parent
1899f3a00f
commit
aee44943fa
37 files changed
+1502
-1118
No files matched your search
+4
-2
@@ -9,6 +9,7 @@
|
||||
#include "route_lib.h"
|
||||
#include "routing.h"
|
||||
#include "topo_group.h"
|
||||
#include "topo_group_invite.h"
|
||||
#include "nat_detection.h"
|
||||
#include "etcp_connections.h"
|
||||
#include "etcp.h"
|
||||
@@ -216,7 +217,7 @@ static int instance_init_common(struct UTUN_INSTANCE* instance, struct UASYNC* u
|
||||
} else {
|
||||
DEBUG_INFO(DEBUG_CATEGORY_BGP, "BGP module initialized");
|
||||
etcp_router_bind(instance, ETCP_RT_ID_CONN_MGR, conn_mgr_router_recv_handler);
|
||||
etcp_bind(instance, ETCP_RT_ID_CONN_MGR, conn_mgr_direct_recv_handler);
|
||||
topo_group_invite_init(instance);
|
||||
struct TOPO_GROUP* g = topo_groups_get_default(instance->topo_groups);
|
||||
if (instance->rt && g && g->local_node) {
|
||||
topo_group_update_my_nodeinfo(instance, g);
|
||||
@@ -466,7 +467,8 @@ void utun_instance_destroy(struct UTUN_INSTANCE *instance) {
|
||||
/* Phase F: BGP */
|
||||
if (instance->topo_groups) {
|
||||
etcp_router_unbind(instance, ETCP_RT_ID_CONN_MGR);
|
||||
etcp_unbind(instance, ETCP_RT_ID_CONN_MGR);
|
||||
etcp_unbind(instance, ETCP_RT_ID_GROUP_INVITE);
|
||||
topo_group_invite_cancel_all(instance);
|
||||
topo_groups_destroy(instance);
|
||||
}
|
||||
broadcast_destroy_instance(instance);
|
||||
|
||||
Reference in new issue
Block a user