conn fix
This commit is contained in:
1 parent
4c3681c045
commit
481788c4f3
1 file changed
+2
-2
@@ -89,7 +89,7 @@ static void etcp_link_send_init(struct ETCP_LINK* link, uint8_t reset) {
|
||||
// Debug: print remote address before sending
|
||||
if (link->remote_addr.ss_family == AF_INET) {
|
||||
struct sockaddr_in* sin = (struct sockaddr_in*)&link->remote_addr;
|
||||
DEBUG_INFO(DEBUG_CATEGORY_ETCP, "[ETCP] INIT sending to %s:%d, link=%p", ip_to_str(&sin->sin_addr, AF_INET).str, ntohs(sin->sin_port), link);
|
||||
DEBUG_INFO(DEBUG_CATEGORY_ETCP, "[ETCP] INIT sending to %s:%d, link=%p, rst_req=%d", ip_to_str(&sin->sin_addr, AF_INET).str, ntohs(sin->sin_port), link, reset);
|
||||
}
|
||||
|
||||
etcp_encrypt_send(dgram);
|
||||
@@ -846,7 +846,7 @@ static void etcp_connections_read_callback_socket(socket_t sock, void* arg) {
|
||||
link->remote_link_id = ack_hdr->link_id;
|
||||
|
||||
// For new links: INIT_REQUEST (0x02) causes reset, CHANNEL_INIT (0x04) does not
|
||||
if (ack_hdr->code == ETCP_INIT_REQUEST) {
|
||||
if (ack_hdr->code == ETCP_INIT_REQUEST || new_conn) {
|
||||
send_reset = 1; // INIT_REQUEST (0x02) or uninitialized link - send reset
|
||||
etcp_conn_reinit(conn);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user