Wire member revocation into CM and complete scoped policy tests
This commit is contained in:
1 parent
83925d4e56
commit
f30ef75384
2 files changed
+3
-1
No files matched your search
@@ -438,6 +438,7 @@ int topo_group_data_allowed(struct TOPO_GROUP* group, struct ETCP_CONN* conn) {
|
||||
void topo_group_revalidate_members(struct TOPO_GROUP* group) {
|
||||
if (!group || group->group_type != TOPO_GROUP_TYPE_CHAT || group->stopping) return;
|
||||
etcp_router_revalidate_group(group->instance, group->group_id);
|
||||
conn_mgr_revalidate_members(group->conn_mgr);
|
||||
/* Удаление вызывает callbacks и меняет список; каждый раз ищем следующего заново. */
|
||||
for (;;) {
|
||||
struct TOPO_GROUP_CONN_ITEM* invalid = NULL;
|
||||
|
||||
@@ -234,6 +234,7 @@ static void setup_bgp_for_sign_test(struct UTUN_INSTANCE* inst, int with_ed25519
|
||||
memset((uint8_t*)group + sizeof(struct ll_entry), 0, sizeof(*group) - sizeof(struct ll_entry));
|
||||
group->instance = inst;
|
||||
group->group_id = TOPO_GROUP_UTUN;
|
||||
group->group_type = TOPO_GROUP_TYPE_UTUN;
|
||||
group->nodes = queue_new(inst->ua, BGP_NODES_HASH_SIZE,
|
||||
offsetof(struct TOPO_GROUP_NODE, node_id) - sizeof(struct ll_entry), 8, "group_nodes_test");
|
||||
if (!group->nodes) { printf(" setup_bgp: queue_new failed\n"); queue_entry_free(qe); return; }
|
||||
@@ -1531,7 +1532,7 @@ static int test_chat_policy_scope(void) {
|
||||
.src_node_id = SIGNER_NODE, .dst_node_id = inst.node_id, .reset_id = SIGNER_NODE, .flags = ROUTER_FLAG_START};
|
||||
struct ll_entry* entry = ll_alloc_lldgram(sizeof(hello)); TESTASSERT(entry);
|
||||
memcpy(entry->dgram, &hello, sizeof(hello)); entry->len = sizeof(hello); recv_cb(&fake_conn, entry);
|
||||
TESTASSERT(c->pending_peer_reset_id == SIGNER_NODE);
|
||||
TESTASSERT(c->pending_peer_id == SIGNER_NODE);
|
||||
etcp_router_revalidate_group(&inst, group->group_id); TESTASSERT(!c->closed);
|
||||
/* Тип, а не числовой group ID выбирает область политики. */
|
||||
group->group_type = TOPO_GROUP_TYPE_CHAT;
|
||||
|
||||
Reference in new issue
Block a user