Preserve group attachment before transport readiness

This commit is contained in:
evgeny committed 2026-10-24 16:01:29 +02:00
1 parent f541ab428b
commit 007f7c8ae8
2 files changed
+4 -3

No files matched your search

+2 -2
View File
@@ -955,8 +955,8 @@ void topo_groups_set_node_updated_cb(struct TOPO_GROUPS* groups, topo_node_updat
static int topo_group_begin_conn(struct TOPO_GROUP* group, struct ETCP_CONN* conn, int retain) {
if (!group || !conn) { DEBUG_ERROR(DEBUG_CATEGORY_BGP, "invalid args"); return -1; }
if (group->stopping) { DEBUG_WARN(DEBUG_CATEGORY_BGP, "join on stopped group"); return -1; }
if (conn->instance != group->instance || !conn->links_up || conn->close_requested) {
DEBUG_WARN(DEBUG_CATEGORY_BGP, "group join needs a live transport of the same instance peer=%016llx group=%016llx",
if (conn->instance != group->instance || conn->close_requested) {
DEBUG_WARN(DEBUG_CATEGORY_BGP, "group join needs an open transport of the same instance peer=%016llx group=%016llx",
(unsigned long long)conn->peer_node_id, (unsigned long long)group->group_id); return -1;
}
if (!conn->instance->rt) { DEBUG_ERROR(DEBUG_CATEGORY_BGP, "conn->instance->rt is NULL"); return -1; }
+2 -1
View File
@@ -328,7 +328,8 @@ struct TOPO_GROUP* topo_groups_create_group(struct TOPO_GROUPS* g, uint64_t grou
void topo_groups_remove_group(struct TOPO_GROUPS* g, uint64_t group_id);
/**
* @brief Присоединяет UP-транспорт того же instance к группе и начинает JOIN/ACCEPT.
* @brief Присоединяет открытый транспорт того же instance к группе и начинает JOIN/ACCEPT.
* Допускает постановку обмена до UP; READY требует UP и завершённой синхронизации.
* Группа приобретает собственный NCD handle; повтор не сбрасывает сессию. 0/-1.
* Для обычного инициатора используйте отменяемый topo_group_peer_open().
*/