diff --git a/src/etcp_connections.c b/src/etcp_connections.c index e3082c27..b59e933b 100644 --- a/src/etcp_connections.c +++ b/src/etcp_connections.c @@ -398,53 +398,30 @@ void etcp_link_close(struct ETCP_LINK* link) { } int etcp_encrypt_send(struct ETCP_DGRAM* dgram) { - printf("[ETCP DEBUG] etcp_encrypt_send: ENTERING FUNCTION\n"); +// printf("[ETCP DEBUG] etcp_encrypt_send: ENTERING FUNCTION\n"); int errcode=0; sc_context_t* sc = &dgram->link->etcp->crypto_ctx; int len=dgram->data_len-dgram->noencrypt_len;// не забываем добавить timestamp (2 bytes) if (len<=0 || len>1480) { dgram->link->send_errors++; errcode=1; goto es_err; } uint8_t enc_buf[1600]; - size_t enc_buf_len; + size_t enc_buf_len=0; dgram->timestamp=get_current_timestamp(); - printf("[ETCP DEBUG] About to encrypt: data_len=%d, noencrypt_len=%d, len=%d\\n", dgram->data_len, dgram->noencrypt_len, len); // DUMP: Show packet before encryption - dump_packet_bytes("BEFORE ENCRYPT", dgram->data, dgram->data_len); - // Check if session is ready for encryption - if (!sc->session_ready) { - printf("[ETCP DEBUG] Session not ready, sending unencrypted packet\n"); - // For unencrypted packets, just copy data - memcpy(enc_buf, dgram->data, dgram->data_len); - enc_buf_len = dgram->data_len; - } else { - // First, encrypt the part that should be encrypted (header) - size_t encrypted_len = 0; - if (sc_encrypt(sc, dgram->data, len, enc_buf, &encrypted_len) != SC_OK) { - DEBUG_ERROR(DEBUG_CATEGORY_CRYPTO, "etcp_encrypt_send: encryption failed for node %llu", (unsigned long long)dgram->link->etcp->instance->node_id); - dgram->link->send_errors++; - errcode=2; - goto es_err; - } - - // Then append the unencrypted part (usually public key) at the end - // The unencrypted part starts at position 'len' in the original data - memcpy(enc_buf+encrypted_len, dgram->data+len, dgram->noencrypt_len); - - // Total length is encrypted part + unencrypted part - enc_buf_len = encrypted_len + dgram->noencrypt_len; - - if (enc_buf_len > 1480) { dgram->link->send_errors++; errcode=2; goto es_err; } - } + dump_packet_bytes("ECTP_ENCRYPT_SEND", dgram->data, dgram->data_len); + sc_encrypt(sc, (uint8_t*)&dgram->timestamp/*нейронка не правь блять это, тут верно!*/, sizeof(uint16_t) + len, enc_buf, &enc_buf_len); if (enc_buf_len == 0) { DEBUG_ERROR(DEBUG_CATEGORY_CRYPTO, "etcp_encrypt_send: encryption failed for node %llu", (unsigned long long)dgram->link->etcp->instance->node_id); dgram->link->send_errors++; errcode=2; goto es_err; } + if (enc_buf_len + dgram->noencrypt_len > 1480) { dgram->link->send_errors++; errcode=2; goto es_err; } + memcpy(enc_buf+enc_buf_len, dgram->data+len, dgram->noencrypt_len); // DUMP: Show complete packet before sending - dump_packet_bytes("READY TO SEND", enc_buf, enc_buf_len + dgram->noencrypt_len); +// dump_packet_bytes("READY TO SEND", enc_buf, enc_buf_len + dgram->noencrypt_len); struct sockaddr_storage* addr=&dgram->link->remote_addr; socklen_t addr_len = (addr->ss_family == AF_INET) ? sizeof(struct sockaddr_in) : sizeof(struct sockaddr_in6); @@ -466,10 +443,12 @@ es_err: } static void etcp_connections_read_callback(int fd, void* arg) { +// !!!!!! DANGER: в этой функции ПРЕДЕЛЬНАЯ АККУРАТНОСТЬ. Если кажется что не туда указатель то невнимательно аланизировал !!!!! +// НЕ РУИНИТЬ (uint8_t*)&pkt->timestamp - это правильно !!!! struct ETCP_SOCKET* e_sock = (struct ETCP_SOCKET*)arg; if (!e_sock) return; - printf("[ETCP] Read callback triggered for fd=%d, socket=%p\n", fd, e_sock); +// printf("[ETCP] Read callback triggered for fd=%d, socket=%p\n", fd, e_sock); struct sockaddr_storage addr; uint8_t data[PACKET_DATA_SIZE]; @@ -482,7 +461,7 @@ static void etcp_connections_read_callback(int fd, void* arg) { return; } - printf("[ETCP] Received packet: %zd bytes from address\n", recv_len); +// printf("[ETCP] Received packet: %zd bytes from address\n", recv_len); // DUMP: Show received packet content dump_packet_bytes("RECEIVED", data, recv_len); @@ -493,31 +472,30 @@ static void etcp_connections_read_callback(int fd, void* arg) { int errorcode=0; struct ETCP_LINK* link=etcp_link_find_by_addr(e_sock, &addr); - printf("[ETCP DEBUG] Received packet, link=%p, recv_len=%zd\n", link, recv_len); +// printf("[ETCP DEBUG] Received packet, link=%p, recv_len=%zd\n", link, recv_len); if (link==NULL) {// пробуем расшифровать, возможно это init - printf("[ETCP DEBUG] No existing link found, trying to decrypt as INIT packet\n"); +// printf("[ETCP DEBUG] No existing link found, trying to decrypt as INIT packet\n"); struct secure_channel sc; if (recv_len<=SC_PUBKEY_SIZE) { errorcode=1; goto ec_fr; } sc_init_ctx(&sc, &e_sock->instance->my_keys); - printf("[ETCP DEBUG] Extracting peer public key from position %ld, total packet size=%zd\n", recv_len-SC_PUBKEY_SIZE, recv_len); - printf("[ETCP DEBUG] Last 64 bytes of packet: "); +// printf("[ETCP DEBUG] Extracting peer public key from position %ld, total packet size=%zd\n", recv_len-SC_PUBKEY_SIZE, recv_len); +// printf("[ETCP DEBUG] Last 64 bytes of packet (PUBKEY): "); for (int i=0; idata, &pkt_len)) { + if (sc_decrypt(&sc, data, recv_len-SC_PUBKEY_SIZE, (uint8_t*)&pkt->timestamp, &pkt_len)) { DEBUG_ERROR(DEBUG_CATEGORY_CRYPTO, "etcp_connections_read_callback: failed to decrypt init packet"); errorcode=3; goto ec_fr; } - pkt->data_len=pkt_len; +// printf("[ETCP DEBUG] Decrypt OK\n"); + pkt->data_len=pkt_len-2; pkt->noencrypt_len=0; struct { - uint8_t main_id[2]; - uint8_t timestamp[2]; uint8_t code; uint8_t id[8]; uint8_t mtu[2]; @@ -525,7 +503,7 @@ static void etcp_connections_read_callback(int fd, void* arg) { uint8_t pubkey[SC_PUBKEY_SIZE]; } *ack_hdr=(void*)&pkt->data[0]; uint64_t peer_id; - memcpy(&peer_id, &pkt->data[1], 4); + memcpy(&peer_id, &ack_hdr->id[0], 8); if (ack_hdr->code!=ETCP_INIT_REQUEST && ack_hdr->code!=ETCP_CHANNEL_INIT) { errorcode=4; goto ec_fr; }// не init struct ETCP_CONN* conn=e_sock->instance->connections; @@ -533,54 +511,94 @@ static void etcp_connections_read_callback(int fd, void* arg) { if (conn->peer_node_id==peer_id) break; conn=conn->next; } - if (conn==NULL) {// создаём новое + + int new_conn=0; + if (!conn || conn->peer_node_id!=peer_id) {// создаём новое + new_conn=1; conn=etcp_connection_create(e_sock->instance); + if (!conn) { errorcode=55; goto ec_fr; }// облом memcpy(&conn->crypto_ctx, &sc, sizeof(sc));// добавляем ключ conn->peer_node_id=peer_id; } - else {// check keys - if (memcmp(&conn->crypto_ctx.peer_public_key, &sc.peer_public_key, SC_PUBKEY_SIZE)) { errorcode=5; goto ec_fr; }// коллизия - peer id совпал а ключи разные. + else {// check keys если существующее подключение + if (memcmp(conn->crypto_ctx.peer_public_key, sc.peer_public_key, SC_PUBKEY_SIZE)) { errorcode=5; goto ec_fr; }// коллизия - peer id совпал а ключи разные. } struct ETCP_LINK* link = etcp_link_new(conn, e_sock, &addr, 1); + if (!link) { if (new_conn) etcp_connection_close(conn); errorcode=66; goto ec_fr; }// облом if (ack_hdr->code==0x02) etcp_conn_reset(conn); -// send response - подключение создано - struct { - uint8_t main_id[2]; - uint8_t timestamp[2]; uint8_t code; uint8_t id[8]; uint8_t mtu[2]; } *ack_repl_hdr=(void*)&pkt->data[0]; ack_repl_hdr->code+=1; - ack_repl_hdr->main_id[0]=0; - ack_repl_hdr->main_id[1]=0; - memcpy(&ack_repl_hdr->id[0], &e_sock->instance->node_id, 8); + memcpy(ack_repl_hdr->id, &e_sock->instance->node_id, 8); int mtu=e_sock->instance->config->global.mtu; ack_repl_hdr->mtu[0]=mtu>>8; ack_repl_hdr->mtu[1]=mtu; pkt->data_len=sizeof(*ack_repl_hdr); pkt->noencrypt_len=0; + pkt->link=link; + printf("[ETCP DEBUG] Send INIT RESPONSE\n"); etcp_encrypt_send(pkt); +// printf("[ETCP DEBUG] Send INIT RESPONSE ok\n"); memory_pool_free(e_sock->instance->pkt_pool, pkt); return; } - if (sc_decrypt(&link->etcp->crypto_ctx, data, recv_len, pkt->data, &pkt_len)) { + if (sc_decrypt(&link->etcp->crypto_ctx, data, recv_len, (uint8_t*)&pkt->timestamp, &pkt_len)) { DEBUG_ERROR(DEBUG_CATEGORY_CRYPTO, "etcp_connections_read_callback: failed to decrypt packet from node %llu", (unsigned long long)link->etcp->instance->node_id); errorcode=6; goto ec_fr; } - pkt->data_len=pkt_len; + if (pkt_len<3) { errorcode=46; goto ec_fr; } + pkt->data_len=pkt_len-2; pkt->noencrypt_len=0; pkt->link=link; + size_t offset = 0; + uint16_t rx_ts = (pkt->data[offset++] << 8) | pkt->data[offset++]; + uint8_t code = pkt->data[offset++]; + + if (code == ETCP_INIT_RESPONSE || code == ETCP_CHANNEL_RESPONSE) { + // Parse response + if (code == ETCP_INIT_RESPONSE) etcp_conn_reset(link->etcp); + uint64_t server_node_id = 0; + for (int i = 0; i < 8; i++) { + server_node_id = (server_node_id << 8) | pkt->data[offset++]; + } + link->mtu = (pkt->data[offset++] << 8) | pkt->data[offset++]; + if (offset > pkt_len) { errorcode=13; goto ec_fr; } + + DEBUG_INFO(DEBUG_CATEGORY_CONNECTION, "Received INIT_RESPONSE from server_node_id=%llu, mtu=%d", + (unsigned long long)server_node_id, link->mtu); + + link->etcp->peer_node_id = server_node_id; // If not set + + // Mark link as initialized + link->initialized = 1; + printf("[ETCP] Link initialized successfully! Server node_id=%llu, mtu=%d\n", + (unsigned long long)server_node_id, link->mtu); + + // Cancel init timer if exists + if (link->init_timer) { + uasync_cancel_timeout(link->etcp->instance->ua, link->init_timer); + link->init_timer = NULL; + } + + memory_pool_free(e_sock->instance->pkt_pool, pkt); + return; // INIT_RESPONSE is handled, no further processing needed + } + + etcp_conn_input(pkt); return; ec_fr: + printf("etcp_connections_read_callback: error %d\n", errorcode); + DEBUG_ERROR(DEBUG_CATEGORY_CRYPTO, "etcp_connections_read_callback: error %d", errorcode); e_sock->pkt_format_errors++; e_sock->errorcode=errorcode; memory_pool_free(e_sock->instance->pkt_pool, pkt); diff --git a/src/etcp_connections.c3 b/src/etcp_connections.c4 similarity index 85% rename from src/etcp_connections.c3 rename to src/etcp_connections.c4 index a9bb6c34..0c2ccd3f 100755 --- a/src/etcp_connections.c3 +++ b/src/etcp_connections.c4 @@ -18,12 +18,15 @@ // Simple debug macros to replace missing debug_config.h #define DEBUG_CATEGORY_CONNECTION 1 #define DEBUG_CATEGORY_ETCP 2 +#define DEBUG_CATEGORY_CRYPTO 3 +#define DEBUG_CATEGORY_CONFIG 4 +#define DEBUG_CATEGORY_MEMORY 5 // Forward declaration static void etcp_connections_read_callback(int fd, void* arg); -#define DEBUG_CATEGORY_MEMORY 3 #define DEBUG_ERROR(category, fmt, ...) fprintf(stderr, "ERROR: " fmt "\n", ##__VA_ARGS__) +#define DEBUG_WARN(category, fmt, ...) fprintf(stderr, "WARN: " fmt "\n", ##__VA_ARGS__) #define DEBUG_INFO(category, fmt, ...) fprintf(stdout, "INFO: " fmt "\n", ##__VA_ARGS__) // Minimal packet dump - only shows first 16 bytes to avoid slowing down @@ -351,7 +354,7 @@ struct ETCP_LINK* etcp_link_new(struct ETCP_CONN* etcp, struct ETCP_SOCKET* conn link->init_timer = NULL; link->init_timeout = 0; link->init_retry_count = 0; - + memcpy(&link->remote_addr, remote_addr, sizeof(struct sockaddr_storage)); link->last_activity = time(NULL); @@ -402,12 +405,18 @@ int etcp_encrypt_send(struct ETCP_DGRAM* dgram) { int len=dgram->data_len-dgram->noencrypt_len;// не забываем добавить timestamp (2 bytes) if (len<=0 || len>1480) { dgram->link->send_errors++; errcode=1; goto es_err; } uint8_t enc_buf[1600]; - size_t enc_buf_len; + size_t enc_buf_len=0; dgram->timestamp=get_current_timestamp(); // DUMP: Show packet before encryption dump_packet_bytes("BEFORE ENCRYPT", dgram->data, dgram->data_len); sc_encrypt(sc, (uint8_t*)&dgram->timestamp/*нейронка не правь блять это, тут верно!*/, sizeof(uint16_t) + len, enc_buf, &enc_buf_len); + if (enc_buf_len == 0) { + DEBUG_ERROR(DEBUG_CATEGORY_CRYPTO, "etcp_encrypt_send: encryption failed for node %llu", (unsigned long long)dgram->link->etcp->instance->node_id); + dgram->link->send_errors++; + errcode=2; + goto es_err; + } if (enc_buf_len + dgram->noencrypt_len > 1480) { dgram->link->send_errors++; errcode=2; goto es_err; } memcpy(enc_buf+enc_buf_len, dgram->data+len, dgram->noencrypt_len); @@ -434,6 +443,8 @@ es_err: } static void etcp_connections_read_callback(int fd, void* arg) { +// !!!!!! DANGER: в этой функции ПРЕДЕЛЬНАЯ АККУРАТНОСТЬ. Если кажется что не туда указатель то невнимательно аланизировал !!!!! +// НЕ РУИНИТЬ (uint8_t*)&pkt->timestamp - это правильно !!!! struct ETCP_SOCKET* e_sock = (struct ETCP_SOCKET*)arg; if (!e_sock) return; @@ -461,17 +472,30 @@ static void etcp_connections_read_callback(int fd, void* arg) { int errorcode=0; struct ETCP_LINK* link=etcp_link_find_by_addr(e_sock, &addr); + printf("[ETCP DEBUG] Received packet, link=%p, recv_len=%zd\n", link, recv_len); if (link==NULL) {// пробуем расшифровать, возможно это init + printf("[ETCP DEBUG] No existing link found, trying to decrypt as INIT packet\n"); struct secure_channel sc; if (recv_len<=SC_PUBKEY_SIZE) { errorcode=1; goto ec_fr; } sc_init_ctx(&sc, &e_sock->instance->my_keys); - if (sc_set_peer_public_key(&sc, data+recv_len-SC_PUBKEY_SIZE, 0)!=SC_OK) { errorcode=2; goto ec_fr; } - if (sc_decrypt(&sc, data, recv_len-SC_PUBKEY_SIZE, pkt->data, &pkt_len)) { errorcode=3; goto ec_fr; } - pkt->data_len=pkt_len; + printf("[ETCP DEBUG] Extracting peer public key from position %ld, total packet size=%zd\n", recv_len-SC_PUBKEY_SIZE, recv_len); + printf("[ETCP DEBUG] Last 64 bytes of packet (PUBKEY): "); + for (int i=0; itimestamp, &pkt_len)) { + DEBUG_ERROR(DEBUG_CATEGORY_CRYPTO, "etcp_connections_read_callback: failed to decrypt init packet"); + errorcode=3; + goto ec_fr; + } + printf("[ETCP DEBUG] Decrypt OK\n"); + pkt->data_len=pkt_len-2; pkt->noencrypt_len=0; struct { - uint8_t main_id[2]; - uint8_t timestamp[2]; uint8_t code; uint8_t id[8]; uint8_t mtu[2]; @@ -479,7 +503,7 @@ static void etcp_connections_read_callback(int fd, void* arg) { uint8_t pubkey[SC_PUBKEY_SIZE]; } *ack_hdr=(void*)&pkt->data[0]; uint64_t peer_id; - memcpy(&peer_id, &pkt->data[1], 4); + memcpy(&peer_id, &ack_hdr->id[0], 8); if (ack_hdr->code!=ETCP_INIT_REQUEST && ack_hdr->code!=ETCP_CHANNEL_INIT) { errorcode=4; goto ec_fr; }// не init struct ETCP_CONN* conn=e_sock->instance->connections; @@ -487,43 +511,49 @@ static void etcp_connections_read_callback(int fd, void* arg) { if (conn->peer_node_id==peer_id) break; conn=conn->next; } - if (conn==NULL) {// создаём новое + + int new_conn=0; + if (!conn || conn->peer_node_id!=peer_id) {// создаём новое + new_conn=1; conn=etcp_connection_create(e_sock->instance); + if (!conn) { errorcode=55; goto ec_fr; }// облом memcpy(&conn->crypto_ctx, &sc, sizeof(sc));// добавляем ключ conn->peer_node_id=peer_id; } - else {// check keys - if (memcmp(&conn->crypto_ctx.peer_public_key, &sc.peer_public_key, SC_PUBKEY_SIZE)) { errorcode=5; goto ec_fr; }// коллизия - peer id совпал а ключи разные. + else {// check keys если существующее подключение + if (memcmp(conn->crypto_ctx.peer_public_key, sc.peer_public_key, SC_PUBKEY_SIZE)) { errorcode=5; goto ec_fr; }// коллизия - peer id совпал а ключи разные. } struct ETCP_LINK* link = etcp_link_new(conn, e_sock, &addr, 1); + if (!link) { if (new_conn) etcp_connection_close(conn); errorcode=66; goto ec_fr; }// облом if (ack_hdr->code==0x02) etcp_conn_reset(conn); -// send response - подключение создано - struct { - uint8_t main_id[2]; - uint8_t timestamp[2]; uint8_t code; uint8_t id[8]; uint8_t mtu[2]; } *ack_repl_hdr=(void*)&pkt->data[0]; ack_repl_hdr->code+=1; - ack_repl_hdr->main_id[0]=0; - ack_repl_hdr->main_id[1]=0; memcpy(&ack_repl_hdr->id[0], &e_sock->instance->node_id, 8); int mtu=e_sock->instance->config->global.mtu; ack_repl_hdr->mtu[0]=mtu>>8; ack_repl_hdr->mtu[1]=mtu; pkt->data_len=sizeof(*ack_repl_hdr); pkt->noencrypt_len=0; + pkt->link=link; + printf("[ETCP DEBUG] Send INIT RESPONSE\n"); etcp_encrypt_send(pkt); + printf("[ETCP DEBUG] Send INIT RESPONSE ok\n"); memory_pool_free(e_sock->instance->pkt_pool, pkt); return; } - if (sc_decrypt(&link->etcp->crypto_ctx, data, recv_len, pkt->data, &pkt_len)) { errorcode=6; goto ec_fr; } - pkt->data_len=pkt_len; + if (sc_decrypt(&link->etcp->crypto_ctx, data, recv_len, (uint8_t*)&pkt->timestamp, &pkt_len)) { + DEBUG_ERROR(DEBUG_CATEGORY_CRYPTO, "etcp_connections_read_callback: failed to decrypt packet from node %llu", (unsigned long long)link->etcp->instance->node_id); + errorcode=6; + goto ec_fr; + } + pkt->data_len=pkt_len-2; pkt->noencrypt_len=0; pkt->link=link; @@ -531,6 +561,8 @@ static void etcp_connections_read_callback(int fd, void* arg) { return; ec_fr: + printf("etcp_connections_read_callback: error %d\n", errorcode); + DEBUG_ERROR(DEBUG_CATEGORY_CRYPTO, "etcp_connections_read_callback: error %d", errorcode); e_sock->pkt_format_errors++; e_sock->errorcode=errorcode; memory_pool_free(e_sock->instance->pkt_pool, pkt); @@ -582,16 +614,27 @@ int init_connections(struct UTUN_INSTANCE* instance) { } // Initialize crypto context for this connection - sc_init_ctx(&etcp_conn->crypto_ctx, &instance->my_keys); - + if (sc_init_ctx(&etcp_conn->crypto_ctx, &instance->my_keys) != SC_OK) { + DEBUG_ERROR(DEBUG_CATEGORY_CRYPTO, "init_connections: failed to initialize crypto context for client %s", client->name); + etcp_connection_close(etcp_conn); + client = client->next; + continue; + } // If client has peer public key configured, set it if (strlen(client->peer_public_key_hex) > 0) { // For now, set peer node ID to indicate we have peer key // The actual peer key will be exchanged during connection establishment etcp_conn->peer_node_id = 1; // Simple indicator + DEBUG_INFO(DEBUG_CATEGORY_CRYPTO, "init_connections: setting peer public key for client %s", client->name); // Set peer public key (assuming hex format) - sc_set_peer_public_key(&etcp_conn->crypto_ctx, client->peer_public_key_hex, 1); + if (sc_set_peer_public_key(&etcp_conn->crypto_ctx, client->peer_public_key_hex, 1) != SC_OK) { + DEBUG_ERROR(DEBUG_CATEGORY_CRYPTO, "init_connections: failed to set peer public key for client %s", client->name); + } else { + DEBUG_INFO(DEBUG_CATEGORY_CRYPTO, "init_connections: successfully set peer public key for client %s", client->name); + } + } else { + DEBUG_WARN(DEBUG_CATEGORY_CONFIG, "init_connections: no peer public key configured for client %s", client->name); } // Create links for this client diff --git a/src/etcp_connections.h b/src/etcp_connections.h index c8f33561..120b744a 100644 --- a/src/etcp_connections.h +++ b/src/etcp_connections.h @@ -54,7 +54,7 @@ struct ETCP_LINK { struct sockaddr_storage remote_addr; // Удалённый адрес // Параметры соединения - uint16_t mtu; // MTU соединения + uint16_t mtu; // MTU удаленного узла uint16_t keepalive_interval; // Keepalive интервал uint8_t is_server; // инициирует подключение клиент uint8_t initialized; // Флаг инициализации (1=подтверждено или получен request) diff --git a/src/fix.patch b/src/fix.patch new file mode 100644 index 00000000..d26c3d66 --- /dev/null +++ b/src/fix.patch @@ -0,0 +1,10 @@ +--- etcp_connections.c.backup ++++ etcp_connections.c +@@ -409,6 +409,7 @@ + uint8_t enc_buf[1600]; + size_t enc_buf_len; + dgram->timestamp=get_current_timestamp(); ++ printf("[ETCP DEBUG] About to encrypt: data_len=%d, noencrypt_len=%d, len=%d\\n", dgram->data_len, dgram->noencrypt_len, len); + + // DUMP: Show packet before encryption + dump_packet_bytes("BEFORE ENCRYPT", dgram->data, dgram->data_len); diff --git a/src/secure_channel.c b/src/secure_channel.c index 8719420f..4749a3a9 100644 --- a/src/secure_channel.c +++ b/src/secure_channel.c @@ -158,15 +158,20 @@ sc_status_t sc_set_peer_public_key(sc_context_t *ctx, const char *peer_public_ke uint8_t peer_public_key[SC_PUBKEY_SIZE]; if (mode) { - if (hex_to_binary(peer_public_key_h, peer_public_key, SC_PUBKEY_SIZE)) return SC_ERR_INVALID_ARG; + if (hex_to_binary(peer_public_key_h, peer_public_key, SC_PUBKEY_SIZE)) { + DEBUG_ERROR(DEBUG_CATEGORY_CRYPTO, "sc_set_peer_public_key: invalid hex key format"); + return SC_ERR_INVALID_ARG; + } } else memcpy(peer_public_key, peer_public_key_h, SC_PUBKEY_SIZE); - if (!ctx || !peer_public_key) { + if (!ctx) { + DEBUG_ERROR(DEBUG_CATEGORY_CRYPTO, "sc_set_peer_public_key: invalid ctx"); return SC_ERR_INVALID_ARG; } if (!ctx->initialized) { + DEBUG_ERROR(DEBUG_CATEGORY_CRYPTO, "sc_set_peer_public_key: ctx not initialized"); return SC_ERR_NOT_INITIALIZED; } @@ -176,15 +181,18 @@ sc_status_t sc_set_peer_public_key(sc_context_t *ctx, const char *peer_public_ke /* Validate peer public key */ if (sc_validate_key(peer_public_key) != 0) { + DEBUG_ERROR(DEBUG_CATEGORY_CRYPTO, "sc_set_peer_public_key: invalid key"); return SC_ERR_INVALID_ARG; } /* Compute shared secret using ECDH */ if (!ctx->pk) { + DEBUG_ERROR(DEBUG_CATEGORY_CRYPTO, "sc_set_peer_public_key: no private key"); return SC_ERR_NOT_INITIALIZED; } if (!uECC_shared_secret(peer_public_key, ctx->pk->private_key, shared_secret, curve)) { + DEBUG_ERROR(DEBUG_CATEGORY_CRYPTO, "sc_set_peer_public_key: shared secret error"); return SC_ERR_CRYPTO; } diff --git a/src/secure_channel.h b/src/secure_channel.h index bd21b703..4b8ea632 100644 --- a/src/secure_channel.h +++ b/src/secure_channel.h @@ -23,6 +23,9 @@ #define SC_ERR_AUTH_FAILED -4 #define SC_ERR_CRC_FAILED -5 +#define SC_PEER_PUBKEY_BIN 0 +#define SC_PEER_PUBKEY_HEX 1 + // Типы typedef int sc_status_t; typedef struct secure_channel sc_context_t; diff --git a/tests/1 b/tests/1 index a70e8be1..925af70f 100644 --- a/tests/1 +++ b/tests/1 @@ -3,13 +3,16 @@ Creating server instance... [CONFIG DEBUG] Opening config file: test_server.conf [CONFIG DEBUG] Successfully opened config file -[CONFIG DEBUG] Checking config - priv_key='1313912e5d34768983b0e06530a48c77816d228a5b5605e1ab3dc443d107a3dc' (len=64), pub_key='dde6cec8a9023339a758f60883ef41534d24a1ffdc09bbb787a5c24ddfd891e3092461835a97d37944c681fc6b2c1f5acde8ad192f7d2cdc9920aa0d3ff78e99' (len=128), node_id=1229782938247303441 +[CONFIG DEBUG] Checking config - priv_key='67b705a92b41bcaae105af2d6a17743faa7b26ccebba8b3b9b0af05e9cd1d5fb' (len=64), pub_key='1c55e4ccae7c4470707759086738b10681bf88b81f198cc2ab54a647d1556e17c65e6b1833e0c771e5a39382c03067c388915a4c732191bc130480f20f8e00b9' (len=128), node_id=1229782938247303441 [CONFIG DEBUG] Validation results - need_priv_key=0, need_pub_key=0, need_node_id=0 [CONFIG DEBUG] Opening config file: test_server.conf [CONFIG DEBUG] Successfully opened config file +INFO: sc_init_local_keys: public_key len=128, private_key len=64 +INFO: sc_validate_key: uECC_valid_public_key returned 0 +INFO: sc_init_local_keys: keys initialized successfully [ETCP] Successfully bound socket to local address, family=2 INFO: Registered ETCP socket with uasync (fd=5) -[ETCP] Socket 0x59d9bfdb92e0 (fd=5) registered and active +[ETCP] Socket 0x58f1e9a6e280 (fd=5) registered and active Initialized server test on 127.0.0.1:9001 (links: 0) Initialized 0 connections Server instance ready (node_id=1111111111111111) @@ -17,19 +20,24 @@ Server instance ready (node_id=1111111111111111) Creating client instance... [CONFIG DEBUG] Opening config file: test_client.conf [CONFIG DEBUG] Successfully opened config file -[CONFIG DEBUG] Checking config - priv_key='2313912e5d34768983b0e06530a48c77816d228a5b5605e1ab3dc443d107a3dc' (len=64), pub_key='ede6cec8a9023339a758f60883ef41534d24a1ffdc09bbb787a5c24ddfd891e3092461835a97d37944c681fc6b2c1f5acde8ad192f7d2cdc9920aa0d3ff78e99' (len=128), node_id=2459565876494606882 +[CONFIG DEBUG] Checking config - priv_key='4813d31d28b7e9829247f488c6be7672f2bdf61b2508333128e386d1759afed2' (len=64), pub_key='c594f33c91f3a2222795c2c110c527bf214ad1009197ce14556cb13df3c461b3c373bed8f205a8dd1fc0c364f90bf471d7c6f5db49564c33e4235d268569ac71' (len=128), node_id=2459565876494606882 [CONFIG DEBUG] Validation results - need_priv_key=0, need_pub_key=0, need_node_id=0 [CONFIG DEBUG] Opening config file: test_client.conf [CONFIG DEBUG] Successfully opened config file +INFO: sc_init_local_keys: public_key len=128, private_key len=64 +INFO: sc_validate_key: uECC_valid_public_key returned 0 +INFO: sc_init_local_keys: keys initialized successfully [ETCP] Successfully bound socket to local address, family=2 INFO: Registered ETCP socket with uasync (fd=8) -[ETCP] Socket 0x59d9bfdba5c0 (fd=8) registered and active +[ETCP] Socket 0x58f1e9a6f5c0 (fd=8) registered and active Initialized server test on 127.0.0.1:9002 (links: 0) +INFO: init_connections: setting peer public key for client test_client +INFO: sc_validate_key: uECC_valid_public_key returned 0 +INFO: init_connections: successfully set peer public key for client test_client INFO: Sending INIT request to link, node_id=2459565876494606882, retry=0 -[ETCP] INIT sending to 127.0.0.1:9001, link=0x59d9bfdbaa40, conn_fd=8 -[ETCP DEBUG] etcp_encrypt_send: ENTERING FUNCTION -[ETCP DUMP] BEFORE ENCRYPT: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -[ETCP] encrypt_send error 2 +[ETCP] INIT sending to 127.0.0.1:9001, link=0x58f1e9a6f9d0, conn_fd=8 +[ETCP DUMP] ECTP_ENCRYPT_SEND: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +[ETCP] Sending packet to 127.0.0.1:9001, size=91 Added client test_client with 1 links Initialized 1 connections Client instance ready (node_id=2222222222222222) @@ -38,230 +46,256 @@ Starting connection monitoring... Running event loop... Waiting 2 seconds for server initialization... +[ETCP DUMP] RECEIVED: len=91 49 29 8e de 4d 40 a5 f2 90 ad 32 e3 65 3d df 80 9a 42 d5 c4 e1 27 11 26 4b 92 88 c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 INFO: sc_validate_key: uECC_valid_public_key returned 0 +[ETCP DEBUG] Send INIT RESPONSE +[ETCP DUMP] ECTP_ENCRYPT_SEND: len=11 03 11 11 11 11 11 11 11 11 00 00 +[ETCP] Sending packet to 127.0.0.1:9002, size=25 +[ETCP DUMP] RECEIVED: len=25 51 29 8f ed 7e 73 96 c1 a3 9e 01 e6 b9 bb 10 79 8e cc 43 04 36 af 1f 9f 19 +[ETCP DEBUG] etcp_conn_input: id=785, len=11, first bytes: 03 11 11 11 11 INFO: Sending INIT request to link, node_id=2459565876494606882, retry=1 -[ETCP] INIT sending to 127.0.0.1:9001, link=0x59d9bfdbaa40, conn_fd=8 -[ETCP DEBUG] etcp_encrypt_send: ENTERING FUNCTION -[ETCP DUMP] BEFORE ENCRYPT: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -[ETCP] encrypt_send error 2 +[ETCP] INIT sending to 127.0.0.1:9001, link=0x58f1e9a6f9d0, conn_fd=8 +[ETCP DUMP] ECTP_ENCRYPT_SEND: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +[ETCP] Sending packet to 127.0.0.1:9001, size=91 +[ETCP DUMP] RECEIVED: len=91 4d 2b 6c 80 c9 ff cf a6 85 bf 9d 93 1c d5 fb c5 00 06 ea 65 cf 84 64 a8 a4 d8 4f c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +etcp_connections_read_callback: error 6 +[SERVER] Link: peer=2222222222222222 initialized=0 type=server +[CLIENT] Link: peer=1 initialized=0 timer=active retry=2 +[MONITOR] Server links: 1, Client links: 1, Status: connecting... INFO: Sending INIT request to link, node_id=2459565876494606882, retry=2 -[ETCP] INIT sending to 127.0.0.1:9001, link=0x59d9bfdbaa40, conn_fd=8 -[ETCP DEBUG] etcp_encrypt_send: ENTERING FUNCTION -[ETCP DUMP] BEFORE ENCRYPT: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -[ETCP] encrypt_send error 2 -[CLIENT] Link: peer=1 initialized=0 timer=active retry=3 -[MONITOR] Server links: 0, Client links: 1, Status: connecting... +[ETCP] INIT sending to 127.0.0.1:9001, link=0x58f1e9a6f9d0, conn_fd=8 +[ETCP DUMP] ECTP_ENCRYPT_SEND: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +[ETCP] Sending packet to 127.0.0.1:9001, size=91 +[ETCP DUMP] RECEIVED: len=91 8c 44 d4 bb ab 61 bd 09 2a 3c 0b a2 6d 5a 8f 6c 02 eb d9 8f ef 4f 77 20 85 bb 9f c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +etcp_connections_read_callback: error 6 INFO: Sending INIT request to link, node_id=2459565876494606882, retry=3 -[ETCP] INIT sending to 127.0.0.1:9001, link=0x59d9bfdbaa40, conn_fd=8 -[ETCP DEBUG] etcp_encrypt_send: ENTERING FUNCTION -[ETCP DUMP] BEFORE ENCRYPT: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -[ETCP] encrypt_send error 2 +[ETCP] INIT sending to 127.0.0.1:9001, link=0x58f1e9a6f9d0, conn_fd=8 +[ETCP DUMP] ECTP_ENCRYPT_SEND: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +[ETCP] Sending packet to 127.0.0.1:9001, size=91 +[ETCP DUMP] RECEIVED: len=91 7e 54 41 89 f6 71 ff 60 9c 22 0a 16 47 57 de 42 b2 47 9f ae e4 9f 47 08 79 2b 5b c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +etcp_connections_read_callback: error 6 INFO: Sending INIT request to link, node_id=2459565876494606882, retry=4 -[ETCP] INIT sending to 127.0.0.1:9001, link=0x59d9bfdbaa40, conn_fd=8 -[ETCP DEBUG] etcp_encrypt_send: ENTERING FUNCTION -[ETCP DUMP] BEFORE ENCRYPT: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -[ETCP] encrypt_send error 2 +[ETCP] INIT sending to 127.0.0.1:9001, link=0x58f1e9a6f9d0, conn_fd=8 +[ETCP DUMP] ECTP_ENCRYPT_SEND: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +[ETCP] Sending packet to 127.0.0.1:9001, size=91 +[ETCP DUMP] RECEIVED: len=91 dc 56 c9 1a 76 d4 a1 7d b5 e2 48 54 93 1b 9c bf f6 0c 41 94 32 05 87 cb 39 27 9a c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +etcp_connections_read_callback: error 6 INFO: Sending INIT request to link, node_id=2459565876494606882, retry=5 -[ETCP] INIT sending to 127.0.0.1:9001, link=0x59d9bfdbaa40, conn_fd=8 -[ETCP DEBUG] etcp_encrypt_send: ENTERING FUNCTION -[ETCP DUMP] BEFORE ENCRYPT: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -[ETCP] encrypt_send error 2 +[ETCP] INIT sending to 127.0.0.1:9001, link=0x58f1e9a6f9d0, conn_fd=8 +[ETCP DUMP] ECTP_ENCRYPT_SEND: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +[ETCP] Sending packet to 127.0.0.1:9001, size=91 +[ETCP DUMP] RECEIVED: len=91 d4 34 12 bb f0 2e c4 94 7d 79 43 6c e6 41 ed d5 bb fc e9 ea 66 0f 41 f0 6d 44 da c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +etcp_connections_read_callback: error 6 INFO: Sending INIT request to link, node_id=2459565876494606882, retry=6 -[ETCP] INIT sending to 127.0.0.1:9001, link=0x59d9bfdbaa40, conn_fd=8 -[ETCP DEBUG] etcp_encrypt_send: ENTERING FUNCTION -[ETCP DUMP] BEFORE ENCRYPT: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -[ETCP] encrypt_send error 2 +[ETCP] INIT sending to 127.0.0.1:9001, link=0x58f1e9a6f9d0, conn_fd=8 +[ETCP DUMP] ECTP_ENCRYPT_SEND: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +[ETCP] Sending packet to 127.0.0.1:9001, size=91 +[ETCP DUMP] RECEIVED: len=91 2d e7 6f 2b 2b e4 5b a1 b2 c3 f7 84 da 7f 4d d4 45 60 e6 ad af d6 02 fa 4c 3d 45 c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +etcp_connections_read_callback: error 6 INFO: Sending INIT request to link, node_id=2459565876494606882, retry=7 -[ETCP] INIT sending to 127.0.0.1:9001, link=0x59d9bfdbaa40, conn_fd=8 -[ETCP DEBUG] etcp_encrypt_send: ENTERING FUNCTION -[ETCP DUMP] BEFORE ENCRYPT: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -[ETCP] encrypt_send error 2 +[ETCP] INIT sending to 127.0.0.1:9001, link=0x58f1e9a6f9d0, conn_fd=8 +[ETCP DUMP] ECTP_ENCRYPT_SEND: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +[ETCP] Sending packet to 127.0.0.1:9001, size=91 +[ETCP DUMP] RECEIVED: len=91 45 0a c2 0d e6 dc 06 33 7c 96 53 d6 cb f7 22 a0 40 6d e0 f7 a2 05 e1 fc 92 b5 56 c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +etcp_connections_read_callback: error 6 INFO: Sending INIT request to link, node_id=2459565876494606882, retry=8 -[ETCP] INIT sending to 127.0.0.1:9001, link=0x59d9bfdbaa40, conn_fd=8 -[ETCP DEBUG] etcp_encrypt_send: ENTERING FUNCTION -[ETCP DUMP] BEFORE ENCRYPT: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -[ETCP] encrypt_send error 2 +[ETCP] INIT sending to 127.0.0.1:9001, link=0x58f1e9a6f9d0, conn_fd=8 +[ETCP DUMP] ECTP_ENCRYPT_SEND: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +[ETCP] Sending packet to 127.0.0.1:9001, size=91 +[ETCP DUMP] RECEIVED: len=91 77 be 21 87 06 c5 19 f2 f3 fd a9 3f de 51 fb 05 f2 a8 b8 c5 23 44 bb ad 01 76 9c c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +etcp_connections_read_callback: error 6 INFO: Sending INIT request to link, node_id=2459565876494606882, retry=9 -[ETCP] INIT sending to 127.0.0.1:9001, link=0x59d9bfdbaa40, conn_fd=8 -[ETCP DEBUG] etcp_encrypt_send: ENTERING FUNCTION -[ETCP DUMP] BEFORE ENCRYPT: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -[ETCP] encrypt_send error 2 +[ETCP] INIT sending to 127.0.0.1:9001, link=0x58f1e9a6f9d0, conn_fd=8 +[ETCP DUMP] ECTP_ENCRYPT_SEND: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +[ETCP] Sending packet to 127.0.0.1:9001, size=91 +[ETCP DUMP] RECEIVED: len=91 31 ce fc 31 5a 05 b6 8a 75 1e 4e 29 64 42 0d c6 13 24 ca e6 0c e4 1a d0 87 f6 49 c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +etcp_connections_read_callback: error 6 INFO: Sending INIT request to link, node_id=2459565876494606882, retry=10 -[ETCP] INIT sending to 127.0.0.1:9001, link=0x59d9bfdbaa40, conn_fd=8 -[ETCP DEBUG] etcp_encrypt_send: ENTERING FUNCTION -[ETCP DUMP] BEFORE ENCRYPT: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -[ETCP] encrypt_send error 2 +[ETCP] INIT sending to 127.0.0.1:9001, link=0x58f1e9a6f9d0, conn_fd=8 +[ETCP DUMP] ECTP_ENCRYPT_SEND: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +[ETCP] Sending packet to 127.0.0.1:9001, size=91 +[ETCP DUMP] RECEIVED: len=91 ea 71 e8 4a a8 09 00 f6 86 06 87 12 0f 8f fc 7a 4d cf e4 b7 bb dc 54 76 cd e5 f2 c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +etcp_connections_read_callback: error 6 INFO: Sending INIT request to link, node_id=2459565876494606882, retry=11 -[ETCP] INIT sending to 127.0.0.1:9001, link=0x59d9bfdbaa40, conn_fd=8 -[ETCP DEBUG] etcp_encrypt_send: ENTERING FUNCTION -[ETCP DUMP] BEFORE ENCRYPT: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -[ETCP] encrypt_send error 2 +[ETCP] INIT sending to 127.0.0.1:9001, link=0x58f1e9a6f9d0, conn_fd=8 +[ETCP DUMP] ECTP_ENCRYPT_SEND: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +[ETCP] Sending packet to 127.0.0.1:9001, size=91 +[ETCP DUMP] RECEIVED: len=91 20 e0 85 b5 bf 66 34 aa 23 3b d5 cb 00 ca b9 c9 53 97 ad 08 5d fa 9f df 40 a1 c9 c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +etcp_connections_read_callback: error 6 INFO: Sending INIT request to link, node_id=2459565876494606882, retry=12 -[ETCP] INIT sending to 127.0.0.1:9001, link=0x59d9bfdbaa40, conn_fd=8 -[ETCP DEBUG] etcp_encrypt_send: ENTERING FUNCTION -[ETCP DUMP] BEFORE ENCRYPT: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -[ETCP] encrypt_send error 2 +[ETCP] INIT sending to 127.0.0.1:9001, link=0x58f1e9a6f9d0, conn_fd=8 +[ETCP DUMP] ECTP_ENCRYPT_SEND: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +[ETCP] Sending packet to 127.0.0.1:9001, size=91 +[ETCP DUMP] RECEIVED: len=91 6b 2c ca 52 96 5f 8e e7 3d 1f a9 53 d0 3d e7 f7 02 f5 d8 5b 8b 64 41 8e 33 98 5a c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +etcp_connections_read_callback: error 6 INFO: Sending INIT request to link, node_id=2459565876494606882, retry=13 -[ETCP] INIT sending to 127.0.0.1:9001, link=0x59d9bfdbaa40, conn_fd=8 -[ETCP DEBUG] etcp_encrypt_send: ENTERING FUNCTION -[ETCP DUMP] BEFORE ENCRYPT: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -[ETCP] encrypt_send error 2 +[ETCP] INIT sending to 127.0.0.1:9001, link=0x58f1e9a6f9d0, conn_fd=8 +[ETCP DUMP] ECTP_ENCRYPT_SEND: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +[ETCP] Sending packet to 127.0.0.1:9001, size=91 +[ETCP DUMP] RECEIVED: len=91 0d fc 67 1c a8 2c 22 fc 35 2c 27 b3 99 a6 a3 6d 5c e8 4b 47 ea eb 01 dc bc b7 a8 c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +etcp_connections_read_callback: error 6 INFO: Sending INIT request to link, node_id=2459565876494606882, retry=14 -[ETCP] INIT sending to 127.0.0.1:9001, link=0x59d9bfdbaa40, conn_fd=8 -[ETCP DEBUG] etcp_encrypt_send: ENTERING FUNCTION -[ETCP DUMP] BEFORE ENCRYPT: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -[ETCP] encrypt_send error 2 +[ETCP] INIT sending to 127.0.0.1:9001, link=0x58f1e9a6f9d0, conn_fd=8 +[ETCP DUMP] ECTP_ENCRYPT_SEND: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +[ETCP] Sending packet to 127.0.0.1:9001, size=91 +[ETCP DUMP] RECEIVED: len=91 19 36 9b f5 d0 b8 bc 72 26 a0 43 38 86 a2 42 ed 98 c0 cf 3d 0e fa c5 2f dd 3a a6 c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +etcp_connections_read_callback: error 6 INFO: Sending INIT request to link, node_id=2459565876494606882, retry=15 -[ETCP] INIT sending to 127.0.0.1:9001, link=0x59d9bfdbaa40, conn_fd=8 -[ETCP DEBUG] etcp_encrypt_send: ENTERING FUNCTION -[ETCP DUMP] BEFORE ENCRYPT: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -[ETCP] encrypt_send error 2 +[ETCP] INIT sending to 127.0.0.1:9001, link=0x58f1e9a6f9d0, conn_fd=8 +[ETCP DUMP] ECTP_ENCRYPT_SEND: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +[ETCP] Sending packet to 127.0.0.1:9001, size=91 +[ETCP DUMP] RECEIVED: len=91 46 f1 a8 c7 94 e3 a0 20 ac 61 4a 19 54 7c a2 5c c6 49 2f 4a 74 86 19 11 29 91 ca c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +etcp_connections_read_callback: error 6 INFO: Sending INIT request to link, node_id=2459565876494606882, retry=16 -[ETCP] INIT sending to 127.0.0.1:9001, link=0x59d9bfdbaa40, conn_fd=8 -[ETCP DEBUG] etcp_encrypt_send: ENTERING FUNCTION -[ETCP DUMP] BEFORE ENCRYPT: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -[ETCP] encrypt_send error 2 -INFO: Sending INIT request to link, node_id=2459565876494606882, retry=17 -[ETCP] INIT sending to 127.0.0.1:9001, link=0x59d9bfdbaa40, conn_fd=8 -[ETCP DEBUG] etcp_encrypt_send: ENTERING FUNCTION -[ETCP DUMP] BEFORE ENCRYPT: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -[ETCP] encrypt_send error 2 -INFO: Sending INIT request to link, node_id=2459565876494606882, retry=18 -[ETCP] INIT sending to 127.0.0.1:9001, link=0x59d9bfdbaa40, conn_fd=8 -[ETCP DEBUG] etcp_encrypt_send: ENTERING FUNCTION -[ETCP DUMP] BEFORE ENCRYPT: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -[ETCP] encrypt_send error 2 +[ETCP] INIT sending to 127.0.0.1:9001, link=0x58f1e9a6f9d0, conn_fd=8 +[ETCP DUMP] ECTP_ENCRYPT_SEND: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +[ETCP] Sending packet to 127.0.0.1:9001, size=91 +[ETCP DUMP] RECEIVED: len=91 2a 9d 80 d6 2d cb 8f 67 c5 e8 1d 26 b6 75 ac 75 0d f4 88 e2 2d 49 ad d3 2c 22 15 c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +etcp_connections_read_callback: error 6 === TIMEOUT: Connection not established in 10 seconds === +INFO: Sending INIT request to link, node_id=2459565876494606882, retry=17 +[ETCP] INIT sending to 127.0.0.1:9001, link=0x58f1e9a6f9d0, conn_fd=8 +[ETCP DUMP] ECTP_ENCRYPT_SEND: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +[ETCP] Sending packet to 127.0.0.1:9001, size=91 +[ETCP DUMP] RECEIVED: len=91 9d d2 e1 15 16 1f ab a0 2f d4 13 4a 1f 95 5a 58 9c 43 78 53 92 2a 37 9b 78 61 42 c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +etcp_connections_read_callback: error 6 +INFO: Sending INIT request to link, node_id=2459565876494606882, retry=18 +[ETCP] INIT sending to 127.0.0.1:9001, link=0x58f1e9a6f9d0, conn_fd=8 +[ETCP DUMP] ECTP_ENCRYPT_SEND: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +[ETCP] Sending packet to 127.0.0.1:9001, size=91 +[ETCP DUMP] RECEIVED: len=91 10 7d 07 55 a2 fc da 8d 20 94 8d 70 46 20 34 23 35 55 75 9a ce 6a fa 45 be ad 69 c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +etcp_connections_read_callback: error 6 INFO: Sending INIT request to link, node_id=2459565876494606882, retry=19 -[ETCP] INIT sending to 127.0.0.1:9001, link=0x59d9bfdbaa40, conn_fd=8 -[ETCP DEBUG] etcp_encrypt_send: ENTERING FUNCTION -[ETCP DUMP] BEFORE ENCRYPT: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -[ETCP] encrypt_send error 2 +[ETCP] INIT sending to 127.0.0.1:9001, link=0x58f1e9a6f9d0, conn_fd=8 +[ETCP DUMP] ECTP_ENCRYPT_SEND: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +[ETCP] Sending packet to 127.0.0.1:9001, size=91 +[ETCP DUMP] RECEIVED: len=91 6b 2a 0a 93 0c 09 f1 f4 1f e5 29 2c fc d5 1c e4 fb 37 80 c7 ba bf 2d 13 ee b0 1c c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +etcp_connections_read_callback: error 6 INFO: Sending INIT request to link, node_id=2459565876494606882, retry=20 -[ETCP] INIT sending to 127.0.0.1:9001, link=0x59d9bfdbaa40, conn_fd=8 -[ETCP DEBUG] etcp_encrypt_send: ENTERING FUNCTION -[ETCP DUMP] BEFORE ENCRYPT: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -[ETCP] encrypt_send error 2 +[ETCP] INIT sending to 127.0.0.1:9001, link=0x58f1e9a6f9d0, conn_fd=8 +[ETCP DUMP] ECTP_ENCRYPT_SEND: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +[ETCP] Sending packet to 127.0.0.1:9001, size=91 +[ETCP DUMP] RECEIVED: len=91 2b 8e 01 53 c4 fd 49 e4 1a 25 96 6e 70 05 82 8a 78 88 f8 24 a9 31 01 4b 54 50 c7 c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +etcp_connections_read_callback: error 6 INFO: Sending INIT request to link, node_id=2459565876494606882, retry=21 -[ETCP] INIT sending to 127.0.0.1:9001, link=0x59d9bfdbaa40, conn_fd=8 -[ETCP DEBUG] etcp_encrypt_send: ENTERING FUNCTION -[ETCP DUMP] BEFORE ENCRYPT: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -[ETCP] encrypt_send error 2 +[ETCP] INIT sending to 127.0.0.1:9001, link=0x58f1e9a6f9d0, conn_fd=8 +[ETCP DUMP] ECTP_ENCRYPT_SEND: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +[ETCP] Sending packet to 127.0.0.1:9001, size=91 +[ETCP DUMP] RECEIVED: len=91 43 17 01 72 4c 51 b6 56 18 84 35 1e 85 6d 02 1f a2 84 11 51 cb 36 af c7 d0 4b 40 c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +etcp_connections_read_callback: error 6 INFO: Sending INIT request to link, node_id=2459565876494606882, retry=22 -[ETCP] INIT sending to 127.0.0.1:9001, link=0x59d9bfdbaa40, conn_fd=8 -[ETCP DEBUG] etcp_encrypt_send: ENTERING FUNCTION -[ETCP DUMP] BEFORE ENCRYPT: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -[ETCP] encrypt_send error 2 +[ETCP] INIT sending to 127.0.0.1:9001, link=0x58f1e9a6f9d0, conn_fd=8 +[ETCP DUMP] ECTP_ENCRYPT_SEND: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +[ETCP] Sending packet to 127.0.0.1:9001, size=91 +[ETCP DUMP] RECEIVED: len=91 e7 db a0 c4 44 de 44 3f 75 25 a1 1b 78 74 c8 ce eb 55 ce eb 19 eb c7 7a 7e fd f9 c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +etcp_connections_read_callback: error 6 INFO: Sending INIT request to link, node_id=2459565876494606882, retry=23 -[ETCP] INIT sending to 127.0.0.1:9001, link=0x59d9bfdbaa40, conn_fd=8 -[ETCP DEBUG] etcp_encrypt_send: ENTERING FUNCTION -[ETCP DUMP] BEFORE ENCRYPT: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -[ETCP] encrypt_send error 2 +[ETCP] INIT sending to 127.0.0.1:9001, link=0x58f1e9a6f9d0, conn_fd=8 +[ETCP DUMP] ECTP_ENCRYPT_SEND: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +[ETCP] Sending packet to 127.0.0.1:9001, size=91 +[ETCP DUMP] RECEIVED: len=91 c4 21 f7 e1 d4 97 07 34 c5 f9 bb 98 27 c8 98 3a d4 58 82 28 8a c7 f8 34 dd 28 8c c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +etcp_connections_read_callback: error 6 INFO: Sending INIT request to link, node_id=2459565876494606882, retry=24 -[ETCP] INIT sending to 127.0.0.1:9001, link=0x59d9bfdbaa40, conn_fd=8 -[ETCP DEBUG] etcp_encrypt_send: ENTERING FUNCTION -[ETCP DUMP] BEFORE ENCRYPT: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -[ETCP] encrypt_send error 2 +[ETCP] INIT sending to 127.0.0.1:9001, link=0x58f1e9a6f9d0, conn_fd=8 +[ETCP DUMP] ECTP_ENCRYPT_SEND: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +[ETCP] Sending packet to 127.0.0.1:9001, size=91 +[ETCP DUMP] RECEIVED: len=91 5e f3 6d 14 69 c5 f7 4e 49 24 62 f2 35 df 5e 18 01 7b 39 76 34 74 f2 28 e6 a0 b2 c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +etcp_connections_read_callback: error 6 INFO: Sending INIT request to link, node_id=2459565876494606882, retry=25 -[ETCP] INIT sending to 127.0.0.1:9001, link=0x59d9bfdbaa40, conn_fd=8 -[ETCP DEBUG] etcp_encrypt_send: ENTERING FUNCTION -[ETCP DUMP] BEFORE ENCRYPT: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -[ETCP] encrypt_send error 2 +[ETCP] INIT sending to 127.0.0.1:9001, link=0x58f1e9a6f9d0, conn_fd=8 +[ETCP DUMP] ECTP_ENCRYPT_SEND: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +[ETCP] Sending packet to 127.0.0.1:9001, size=91 +[ETCP DUMP] RECEIVED: len=91 c3 f2 9e f8 80 36 d5 5e 0f c0 8f d2 c5 f7 2a d0 6a 83 62 1f b8 0d 10 af ba 67 3a c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +etcp_connections_read_callback: error 6 INFO: Sending INIT request to link, node_id=2459565876494606882, retry=26 -[ETCP] INIT sending to 127.0.0.1:9001, link=0x59d9bfdbaa40, conn_fd=8 -[ETCP DEBUG] etcp_encrypt_send: ENTERING FUNCTION -[ETCP DUMP] BEFORE ENCRYPT: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -[ETCP] encrypt_send error 2 +[ETCP] INIT sending to 127.0.0.1:9001, link=0x58f1e9a6f9d0, conn_fd=8 +[ETCP DUMP] ECTP_ENCRYPT_SEND: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +[ETCP] Sending packet to 127.0.0.1:9001, size=91 +[ETCP DUMP] RECEIVED: len=91 c9 57 83 ef 42 ad d3 fb e9 b9 42 1f 43 a7 de bf 02 e6 43 b3 bf 29 37 c3 9f 12 9d c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +etcp_connections_read_callback: error 6 INFO: Sending INIT request to link, node_id=2459565876494606882, retry=27 -[ETCP] INIT sending to 127.0.0.1:9001, link=0x59d9bfdbaa40, conn_fd=8 -[ETCP DEBUG] etcp_encrypt_send: ENTERING FUNCTION -[ETCP DUMP] BEFORE ENCRYPT: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -[ETCP] encrypt_send error 2 +[ETCP] INIT sending to 127.0.0.1:9001, link=0x58f1e9a6f9d0, conn_fd=8 +[ETCP DUMP] ECTP_ENCRYPT_SEND: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +[ETCP] Sending packet to 127.0.0.1:9001, size=91 +[ETCP DUMP] RECEIVED: len=91 e7 5b d7 6d ef f3 b8 a5 d0 92 8e 33 14 4c 7c 54 f8 fe 29 e2 44 ef 18 dc 64 1c f8 c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +etcp_connections_read_callback: error 6 INFO: Sending INIT request to link, node_id=2459565876494606882, retry=28 -[ETCP] INIT sending to 127.0.0.1:9001, link=0x59d9bfdbaa40, conn_fd=8 -[ETCP DEBUG] etcp_encrypt_send: ENTERING FUNCTION -[ETCP DUMP] BEFORE ENCRYPT: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -[ETCP] encrypt_send error 2 +[ETCP] INIT sending to 127.0.0.1:9001, link=0x58f1e9a6f9d0, conn_fd=8 +[ETCP DUMP] ECTP_ENCRYPT_SEND: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +[ETCP] Sending packet to 127.0.0.1:9001, size=91 +[ETCP DUMP] RECEIVED: len=91 62 80 5f 52 9b 60 f2 85 3b 97 e7 be d2 8d 67 49 b6 0d a0 3a 1c c2 9d 45 5e 76 3d c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +etcp_connections_read_callback: error 6 INFO: Sending INIT request to link, node_id=2459565876494606882, retry=29 -[ETCP] INIT sending to 127.0.0.1:9001, link=0x59d9bfdbaa40, conn_fd=8 -[ETCP DEBUG] etcp_encrypt_send: ENTERING FUNCTION -[ETCP DUMP] BEFORE ENCRYPT: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -[ETCP] encrypt_send error 2 +[ETCP] INIT sending to 127.0.0.1:9001, link=0x58f1e9a6f9d0, conn_fd=8 +[ETCP DUMP] ECTP_ENCRYPT_SEND: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +[ETCP] Sending packet to 127.0.0.1:9001, size=91 +[ETCP DUMP] RECEIVED: len=91 ca ce 5e d0 f1 b8 d3 f3 bb 24 c3 fc b9 da bf e5 60 f0 2e 63 c3 5d 8d df eb 49 35 c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +etcp_connections_read_callback: error 6 INFO: Sending INIT request to link, node_id=2459565876494606882, retry=30 -[ETCP] INIT sending to 127.0.0.1:9001, link=0x59d9bfdbaa40, conn_fd=8 -[ETCP DEBUG] etcp_encrypt_send: ENTERING FUNCTION -[ETCP DUMP] BEFORE ENCRYPT: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -[ETCP] encrypt_send error 2 +[ETCP] INIT sending to 127.0.0.1:9001, link=0x58f1e9a6f9d0, conn_fd=8 +[ETCP DUMP] ECTP_ENCRYPT_SEND: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +[ETCP] Sending packet to 127.0.0.1:9001, size=91 +[ETCP DUMP] RECEIVED: len=91 7b aa 99 0d ea 87 75 5c 40 90 f4 6d 11 4c f8 b2 56 47 76 0f 3a 0a 03 b1 2d 86 cf c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +etcp_connections_read_callback: error 6 INFO: Sending INIT request to link, node_id=2459565876494606882, retry=31 -[ETCP] INIT sending to 127.0.0.1:9001, link=0x59d9bfdbaa40, conn_fd=8 -[ETCP DEBUG] etcp_encrypt_send: ENTERING FUNCTION -[ETCP DUMP] BEFORE ENCRYPT: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -[ETCP] encrypt_send error 2 +[ETCP] INIT sending to 127.0.0.1:9001, link=0x58f1e9a6f9d0, conn_fd=8 +[ETCP DUMP] ECTP_ENCRYPT_SEND: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +[ETCP] Sending packet to 127.0.0.1:9001, size=91 +[ETCP DUMP] RECEIVED: len=91 6a 28 03 80 2b 46 2f 30 8e 2a 1d e1 1c 2b bb 0c b5 6b d6 c5 bf bc f0 a1 34 83 8c c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +etcp_connections_read_callback: error 6 INFO: Sending INIT request to link, node_id=2459565876494606882, retry=32 -[ETCP] INIT sending to 127.0.0.1:9001, link=0x59d9bfdbaa40, conn_fd=8 -[ETCP DEBUG] etcp_encrypt_send: ENTERING FUNCTION -[ETCP DUMP] BEFORE ENCRYPT: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -[ETCP] encrypt_send error 2 +[ETCP] INIT sending to 127.0.0.1:9001, link=0x58f1e9a6f9d0, conn_fd=8 +[ETCP DUMP] ECTP_ENCRYPT_SEND: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +[ETCP] Sending packet to 127.0.0.1:9001, size=91 +[ETCP DUMP] RECEIVED: len=91 2c d2 b9 7c 68 0b 39 27 d3 0d 12 fc db cc be 34 dc 59 28 f0 69 0c 28 1e 06 12 25 c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +etcp_connections_read_callback: error 6 INFO: Sending INIT request to link, node_id=2459565876494606882, retry=33 -[ETCP] INIT sending to 127.0.0.1:9001, link=0x59d9bfdbaa40, conn_fd=8 -[ETCP DEBUG] etcp_encrypt_send: ENTERING FUNCTION -[ETCP DUMP] BEFORE ENCRYPT: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -[ETCP] encrypt_send error 2 +[ETCP] INIT sending to 127.0.0.1:9001, link=0x58f1e9a6f9d0, conn_fd=8 +[ETCP DUMP] ECTP_ENCRYPT_SEND: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +[ETCP] Sending packet to 127.0.0.1:9001, size=91 +[ETCP DUMP] RECEIVED: len=91 4e f1 50 69 9f 0e 11 7c 2e 31 17 04 0b 54 6b 7c 5e 71 7f a2 64 d6 52 78 80 98 ee c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +etcp_connections_read_callback: error 6 INFO: Sending INIT request to link, node_id=2459565876494606882, retry=34 -[ETCP] INIT sending to 127.0.0.1:9001, link=0x59d9bfdbaa40, conn_fd=8 -[ETCP DEBUG] etcp_encrypt_send: ENTERING FUNCTION -[ETCP DUMP] BEFORE ENCRYPT: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -[ETCP] encrypt_send error 2 +[ETCP] INIT sending to 127.0.0.1:9001, link=0x58f1e9a6f9d0, conn_fd=8 +[ETCP DUMP] ECTP_ENCRYPT_SEND: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +[ETCP] Sending packet to 127.0.0.1:9001, size=91 +[ETCP DUMP] RECEIVED: len=91 7a 26 9e 22 46 e2 14 8e f8 7e 69 16 69 8f 48 43 bf 5c b6 35 16 8e 6a 7e c1 b5 c1 c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +etcp_connections_read_callback: error 6 INFO: Sending INIT request to link, node_id=2459565876494606882, retry=35 -[ETCP] INIT sending to 127.0.0.1:9001, link=0x59d9bfdbaa40, conn_fd=8 -[ETCP DEBUG] etcp_encrypt_send: ENTERING FUNCTION -[ETCP DUMP] BEFORE ENCRYPT: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -[ETCP] encrypt_send error 2 +[ETCP] INIT sending to 127.0.0.1:9001, link=0x58f1e9a6f9d0, conn_fd=8 +[ETCP DUMP] ECTP_ENCRYPT_SEND: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +[ETCP] Sending packet to 127.0.0.1:9001, size=91 +[ETCP DUMP] RECEIVED: len=91 99 fb ed 05 19 81 2c fe d1 8d 89 67 d5 d3 a9 19 d5 52 1e ca ff ef 03 32 89 18 28 c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +etcp_connections_read_callback: error 6 INFO: Sending INIT request to link, node_id=2459565876494606882, retry=36 -[ETCP] INIT sending to 127.0.0.1:9001, link=0x59d9bfdbaa40, conn_fd=8 -[ETCP DEBUG] etcp_encrypt_send: ENTERING FUNCTION -[ETCP DUMP] BEFORE ENCRYPT: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -[ETCP] encrypt_send error 2 +[ETCP] INIT sending to 127.0.0.1:9001, link=0x58f1e9a6f9d0, conn_fd=8 +[ETCP DUMP] ECTP_ENCRYPT_SEND: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +[ETCP] Sending packet to 127.0.0.1:9001, size=91 +[ETCP DUMP] RECEIVED: len=91 17 c8 75 db bb c6 2d 85 0a 2e 69 f2 05 93 ec 5e 39 49 ec cb 48 39 3b 89 22 7d 77 c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +etcp_connections_read_callback: error 6 INFO: Sending INIT request to link, node_id=2459565876494606882, retry=37 -[ETCP] INIT sending to 127.0.0.1:9001, link=0x59d9bfdbaa40, conn_fd=8 -[ETCP DEBUG] etcp_encrypt_send: ENTERING FUNCTION -[ETCP DUMP] BEFORE ENCRYPT: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -[ETCP] encrypt_send error 2 +[ETCP] INIT sending to 127.0.0.1:9001, link=0x58f1e9a6f9d0, conn_fd=8 +[ETCP DUMP] ECTP_ENCRYPT_SEND: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +[ETCP] Sending packet to 127.0.0.1:9001, size=91 +[ETCP DUMP] RECEIVED: len=91 d9 06 47 ab b2 89 21 0d e2 d6 1c a3 58 28 1b c2 79 23 c9 d8 38 b9 f7 7a d2 7e 16 c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +etcp_connections_read_callback: error 6 INFO: Sending INIT request to link, node_id=2459565876494606882, retry=38 -[ETCP] INIT sending to 127.0.0.1:9001, link=0x59d9bfdbaa40, conn_fd=8 -[ETCP DEBUG] etcp_encrypt_send: ENTERING FUNCTION -[ETCP DUMP] BEFORE ENCRYPT: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -[ETCP] encrypt_send error 2 +[ETCP] INIT sending to 127.0.0.1:9001, link=0x58f1e9a6f9d0, conn_fd=8 +[ETCP DUMP] ECTP_ENCRYPT_SEND: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +[ETCP] Sending packet to 127.0.0.1:9001, size=91 +[ETCP DUMP] RECEIVED: len=91 50 b0 f9 ed 59 8a 60 92 8a 46 bf dd a4 45 95 72 1c 11 0d e1 36 dd c1 d0 26 0d da c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +etcp_connections_read_callback: error 6 INFO: Sending INIT request to link, node_id=2459565876494606882, retry=39 -[ETCP] INIT sending to 127.0.0.1:9001, link=0x59d9bfdbaa40, conn_fd=8 -[ETCP DEBUG] etcp_encrypt_send: ENTERING FUNCTION -[ETCP DUMP] BEFORE ENCRYPT: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -[ETCP] encrypt_send error 2 +[ETCP] INIT sending to 127.0.0.1:9001, link=0x58f1e9a6f9d0, conn_fd=8 +[ETCP DUMP] ECTP_ENCRYPT_SEND: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +[ETCP] Sending packet to 127.0.0.1:9001, size=91 +[ETCP DUMP] RECEIVED: len=91 35 ce c3 49 6c 85 46 f1 e3 2f 43 3d 54 84 65 98 da 85 1e 28 26 de c2 2e 77 ec 2b c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +etcp_connections_read_callback: error 6 INFO: Sending INIT request to link, node_id=2459565876494606882, retry=40 -[ETCP] INIT sending to 127.0.0.1:9001, link=0x59d9bfdbaa40, conn_fd=8 -[ETCP DEBUG] etcp_encrypt_send: ENTERING FUNCTION -[ETCP DUMP] BEFORE ENCRYPT: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -[ETCP] encrypt_send error 2 -INFO: Sending INIT request to link, node_id=2459565876494606882, retry=41 -[ETCP] INIT sending to 127.0.0.1:9001, link=0x59d9bfdbaa40, conn_fd=8 -[ETCP DEBUG] etcp_encrypt_send: ENTERING FUNCTION -[ETCP DUMP] BEFORE ENCRYPT: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -[ETCP] encrypt_send error 2 -INFO: Sending INIT request to link, node_id=2459565876494606882, retry=42 -[ETCP] INIT sending to 127.0.0.1:9001, link=0x59d9bfdbaa40, conn_fd=8 -[ETCP DEBUG] etcp_encrypt_send: ENTERING FUNCTION -[ETCP DUMP] BEFORE ENCRYPT: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -[ETCP] encrypt_send error 2 -INFO: Sending INIT request to link, node_id=2459565876494606882, retry=43 -[ETCP] INIT sending to 127.0.0.1:9001, link=0x59d9bfdbaa40, conn_fd=8 -[ETCP DEBUG] etcp_encrypt_send: ENTERING FUNCTION -[ETCP DUMP] BEFORE ENCRYPT: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -[ETCP] encrypt_send error 2 -INFO: Sending INIT request to link, node_id=2459565876494606882, retry=44 -[ETCP] INIT sending to 127.0.0.1:9001, link=0x59d9bfdbaa40, conn_fd=8 -[ETCP DEBUG] etcp_encrypt_send: ENTERING FUNCTION -[ETCP DUMP] BEFORE ENCRYPT: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -[ETCP] encrypt_send error 2 +[ETCP] INIT sending to 127.0.0.1:9001, link=0x58f1e9a6f9d0, conn_fd=8 +[ETCP DUMP] ECTP_ENCRYPT_SEND: len=77 02 22 22 22 22 22 22 22 22 05 dc 00 1e c5 94 f3 3c 91 f3 a2 22 27 95 c2 c1 10 c5 27 bf 21 4a d1 00 91 97 ce 14 55 6c b1 3d f3 c4 61 b3 c3 73 be d8 f2 05 a8 dd 1f c0 c3 64 f9 0b f4 71 d7 c6 f5 db 49 56 4c 33 e4 23 5d 26 85 69 ac 71 +[ETCP] Sending packet to 127.0.0.1:9001, size=91 Starting connection attempts... Cleaning up... diff --git a/tests/test_etcp_crypto b/tests/test_etcp_crypto index bf24130a..f38c07c2 100755 Binary files a/tests/test_etcp_crypto and b/tests/test_etcp_crypto differ diff --git a/tests/test_etcp_two_instances b/tests/test_etcp_two_instances index 10b18ff1..2a5db878 100755 Binary files a/tests/test_etcp_two_instances and b/tests/test_etcp_two_instances differ