Keep connection construction independent from link admission policy
This commit is contained in:
1 parent
8d6aef37da
commit
5eb0701a41
3 files changed
+3
-3
No files matched your search
@@ -158,7 +158,7 @@ static void create(void) {
|
||||
}
|
||||
for (int a = 0; a < N; a++) for (int b = 0; b < N; b++) {
|
||||
if (a == b) continue;
|
||||
struct ETCP_CONN* c = conns[a][b] = etcp_connection_create(nodes[a], "virtual_bgp", 0); assert(c);
|
||||
struct ETCP_CONN* c = conns[a][b] = etcp_connection_create(nodes[a], "virtual_bgp"); assert(c);
|
||||
c->peer_node_id = nodes[b]->node_id;
|
||||
assert(sc_init_ctx(&c->crypto_ctx, &nodes[a]->my_keys) == SC_OK);
|
||||
assert(sc_set_peer_public_key(&c->crypto_ctx, nodes[b]->my_keys.public_key, SC_PEER_PUBKEY_BIN) == SC_OK);
|
||||
|
||||
@@ -71,7 +71,7 @@ static void teardown(void) {
|
||||
}
|
||||
|
||||
static struct ETCP_CONN* new_conn(void) {
|
||||
struct ETCP_CONN* conn = etcp_connection_create(&inst, "incoming", 0); CHECK(conn);
|
||||
struct ETCP_CONN* conn = etcp_connection_create(&inst, "incoming"); CHECK(conn);
|
||||
conn->peer_node_id = 42; etcp_conn_add_cbk(conn, deleted_cb, NULL, ETCP_CBK_EVENT_DELETE);
|
||||
queue_set_callback(conn->send_input_q, NULL, NULL);
|
||||
return conn;
|
||||
|
||||
@@ -47,7 +47,7 @@ static void create(struct fixture* f) {
|
||||
memcpy(node->public_key, keys.public_key, SC_PUBKEY_SIZE);
|
||||
f->ids[i] = node->node_id = sc_derive_node_id_from_pubkey(node->public_key);
|
||||
assert(topo_node_registry_store(f->inst->topo_groups, node));
|
||||
struct ETCP_CONN* conn = f->conns[i] = etcp_connection_create(f->inst, "recovery_fixture", 0); assert(conn);
|
||||
struct ETCP_CONN* conn = f->conns[i] = etcp_connection_create(f->inst, "recovery_fixture"); assert(conn);
|
||||
conn->peer_node_id = node->node_id;
|
||||
assert(sc_init_ctx(&conn->crypto_ctx, &f->inst->my_keys) == SC_OK);
|
||||
assert(sc_set_peer_public_key(&conn->crypto_ctx, node->public_key, SC_PEER_PUBKEY_BIN) == SC_OK);
|
||||
|
||||
Reference in new issue
Block a user