|
|
|
@ -1827,8 +1827,6 @@ void etcp_connections_read_callback_socket(socket_t sock, void* arg) { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
DEBUG_TRACE(DEBUG_CATEGORY_DEBUG, "raw_recv on %s from=%s len=%zd", e_sock->name, sockaddr_storage_to_str(&addr).str, recv_len); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// DUMP: Show received packet content
|
|
|
|
// DUMP: Show received packet content
|
|
|
|
if (debug_should_output(DEBUG_LEVEL_DEBUG, DEBUG_CATEGORY_CRYPTO)) log_dump(DEBUG_LEVEL_DEBUG, DEBUG_CATEGORY_CRYPTO, "RECV in:", data, recv_len); |
|
|
|
if (debug_should_output(DEBUG_LEVEL_DEBUG, DEBUG_CATEGORY_CRYPTO)) log_dump(DEBUG_LEVEL_DEBUG, DEBUG_CATEGORY_CRYPTO, "RECV in:", data, recv_len); |
|
|
|
|
|
|
|
|
|
|
|
@ -1852,11 +1850,6 @@ void etcp_connections_read_callback_socket(socket_t sock, void* arg) { |
|
|
|
recv_len, (unsigned long long)link->etcp->crypto_ctx.rx_counter); |
|
|
|
recv_len, (unsigned long long)link->etcp->crypto_ctx.rx_counter); |
|
|
|
sc_status_t dec_rc = sc_decrypt(&link->etcp->crypto_ctx, data, recv_len, (uint8_t*)&pkt->timestamp, &pkt_len); |
|
|
|
sc_status_t dec_rc = sc_decrypt(&link->etcp->crypto_ctx, data, recv_len, (uint8_t*)&pkt->timestamp, &pkt_len); |
|
|
|
if (!dec_rc) { |
|
|
|
if (!dec_rc) { |
|
|
|
DEBUG_TRACE(DEBUG_CATEGORY_DEBUG, "CRYPTO_DECRYPT_OK: log=%s seskey=%02x%02x%02x%02x rx=%llu pkt_len=%zu", |
|
|
|
|
|
|
|
link->etcp->log_name, |
|
|
|
|
|
|
|
link->etcp->crypto_ctx.session_key[0], link->etcp->crypto_ctx.session_key[1], |
|
|
|
|
|
|
|
link->etcp->crypto_ctx.session_key[2], link->etcp->crypto_ctx.session_key[3], |
|
|
|
|
|
|
|
(unsigned long long)link->etcp->crypto_ctx.rx_counter, pkt_len); |
|
|
|
|
|
|
|
goto process_decrypted; |
|
|
|
goto process_decrypted; |
|
|
|
} |
|
|
|
} |
|
|
|
DEBUG_DEBUG(DEBUG_CATEGORY_ETCP, "etcp: DECRYPT FAIL on existing link. rc=%d link=%p log=%s from=%s sess=%d link_state=%d keepalive=%d enc_errs=%zu my_pub=%016llx peer_pub=%016llx seskey=%02x%02x%02x%02x", |
|
|
|
DEBUG_DEBUG(DEBUG_CATEGORY_ETCP, "etcp: DECRYPT FAIL on existing link. rc=%d link=%p log=%s from=%s sess=%d link_state=%d keepalive=%d enc_errs=%zu my_pub=%016llx peer_pub=%016llx seskey=%02x%02x%02x%02x", |
|
|
|
|