Specify explicit admission policy in existing ETCP constructors
This commit is contained in:
1 parent
0850a52180
commit
42bb813ee5
3 files changed
+3
-3
No files matched your search
@@ -933,7 +933,7 @@ static int ncd_open_node(struct UTUN_INSTANCE* inst, uint64_t node_id, ncd_callb
|
||||
char name[MAX_CONN_NAME_LEN];
|
||||
if (copy->node_name && copy->node_name[0]) snprintf(name, sizeof(name), "%s", copy->node_name);
|
||||
else snprintf(name, sizeof(name), "n_%016llx", (unsigned long long)node_id);
|
||||
conn = etcp_connection_create(inst, name);
|
||||
conn = etcp_connection_create(inst, name, 0);
|
||||
if (!conn) { DEBUG_ERROR(DEBUG_CATEGORY_NCD, "[ncd] transport allocation failed node=%016llx", (unsigned long long)node_id); goto done; }
|
||||
created_conn = 1; conn->peer_node_id = node_id; etcp_update_log_name(conn);
|
||||
if (sc_init_ctx(&conn->crypto_ctx, &inst->my_keys) != SC_OK ||
|
||||
|
||||
@@ -593,7 +593,7 @@ static void phase_del_prev(void* arg) {
|
||||
struct ETCP_SOCKET* sock = ctx.client->etcp_sockets;
|
||||
while (sock && (!sock->is_tcp || sock->netif_index != if_nametoindex(ctx.prev_iface))) sock = sock->next;
|
||||
if (!sock) { fail("missing TCP socket for lifecycle probe"); return; }
|
||||
ctx.tcp_probe = etcp_connection_create(ctx.client, "tcp_remove_probe");
|
||||
ctx.tcp_probe = etcp_connection_create(ctx.client, "tcp_remove_probe", 0);
|
||||
if (!ctx.tcp_probe || etcp_conn_ref_take(ctx.tcp_probe) != 0) { fail("cannot create TCP lifecycle probe"); return; }
|
||||
struct sockaddr_storage addr = {0};
|
||||
struct sockaddr_in* sin = (struct sockaddr_in*)&addr;
|
||||
|
||||
@@ -183,7 +183,7 @@ static void setup(void) {
|
||||
inst.data_pool = memory_pool_init(PACKET_DATA_SIZE, "window_data");
|
||||
inst.ack_pool = memory_pool_init(sizeof(struct ACK_PACKET), "window_acks");
|
||||
CHECK(inst.connections && inst.pkt_pool && inst.data_pool && inst.ack_pool);
|
||||
conn = etcp_connection_create(&inst, "windows"); CHECK(conn);
|
||||
conn = etcp_connection_create(&inst, "windows", 0); CHECK(conn);
|
||||
conn->peer_node_id = 2; conn->links_up = 1;
|
||||
etcp_conn_ready(conn);
|
||||
a = u_calloc(1, sizeof(*a)); b = u_calloc(1, sizeof(*b)); CHECK(a && b);
|
||||
|
||||
Reference in new issue
Block a user