diff --git a/tests/test_attachment_send.c b/tests/test_attachment_send.c index fae965491..29ba54cab 100644 --- a/tests/test_attachment_send.c +++ b/tests/test_attachment_send.c @@ -87,11 +87,11 @@ int main(void) { struct SC_MYKEYS peer; uint8_t ed[32]; REQUIRE(!sc_generate_keypair(&peer) && !sc_derive_ed25519_pubkey(peer.private_key, ed)); uint64_t peer_id = sc_derive_node_id_from_pubkey(peer.public_key); - REQUIRE(!dm_start(inst, peer_id, peer.public_key, ed, "test", NULL)); + REQUIRE(!dm_start(inst, peer_id, peer.public_key, ed, "test", NULL, DM_MODE_DEVICE, NULL)); snprintf(conv, sizeof(conv), "%llu", (unsigned long long)dm_derive_conv_id(inst->node_id, peer_id)); REQUIRE(!sc_generate_keypair(&peer) && !sc_derive_ed25519_pubkey(peer.private_key, ed)); peer_id = sc_derive_node_id_from_pubkey(peer.public_key); - REQUIRE(!dm_start(inst, peer_id, peer.public_key, ed, "other", NULL)); + REQUIRE(!dm_start(inst, peer_id, peer.public_key, ed, "other", NULL, DM_MODE_DEVICE, NULL)); char other[64]; snprintf(other, sizeof(other), "%llu", (unsigned long long)dm_derive_conv_id(inst->node_id, peer_id)); struct attachment_send_req* req = u_calloc(1, sizeof(*req)); REQUIRE(req); req->inst = inst; req->is_dm = 1; req->info.kind = ATTACHMENT_VOICE; req->preset = 1; diff --git a/tests/test_call.c b/tests/test_call.c index 267b18bac..827edf9b1 100644 --- a/tests/test_call.c +++ b/tests/test_call.c @@ -425,7 +425,7 @@ static int test_pm_route(struct UTUN_INSTANCE* inst, uint64_t peer, char target[ char conv[24]; snprintf(conv, sizeof(conv), "%llu", (unsigned long long)dm_derive_conv_id(inst->node_id, peer)); snprintf(target, 64, "dm:%s", conv); - if (dm_start(inst, peer, g_sh.x_pub[IDX_B], g_sh.ed_pub[IDX_B], "B", CH_ID)) return 0; + if (dm_start(inst, peer, g_sh.x_pub[IDX_B], g_sh.ed_pub[IDX_B], "B", CH_ID, DM_MODE_DEVICE, NULL)) return 0; uint64_t actual_peer = 0, group = 0, expected = strtoull(CH_ID, NULL, 10); if (!dm_call_route(inst, conv, &actual_peer, &group) || actual_peer != peer || group != expected) return 0; struct TOPO_GROUP* g = topo_groups_find(inst->topo_groups, expected); diff --git a/tests/test_call_admission.c b/tests/test_call_admission.c index 83eb746f7..757dc1887 100644 --- a/tests/test_call_admission.c +++ b/tests/test_call_admission.c @@ -180,7 +180,8 @@ static int admission_step(struct admission_test *t) { if (!bgp_has(a, b->node_id) || !bgp_has(b, a->node_id)) return 1; for (int i = 0; i < 2; i++) { uint64_t peer = t->inst[1 - i]->node_id; - ADMISSION_CHECK(t, dm_start(t->inst[i], peer, g_sh.x_pub[1 - i], g_sh.ed_pub[1 - i], "peer", CH_ID) == 0); + ADMISSION_CHECK(t, dm_start(t->inst[i], peer, g_sh.x_pub[1 - i], g_sh.ed_pub[1 - i], + "peer", CH_ID, DM_MODE_DEVICE, NULL) == 0); snprintf(t->dm[i], sizeof(t->dm[i]), "dm:%llu", (unsigned long long)dm_derive_conv_id(t->inst[i]->node_id, peer)); } t->transport = instance_find_conn(a, b->node_id);