From 3c9e868864652a8d617311d8b7f2dbe8d53801b4 Mon Sep 17 00:00:00 2001 From: hidnplayr Date: Sun, 28 May 2017 20:50:33 +0000 Subject: [PATCH] TCP_process_input: remember device number. git-svn-id: svn://kolibrios.org@6910 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/network/tcp_input.inc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/kernel/trunk/network/tcp_input.inc b/kernel/trunk/network/tcp_input.inc index e96fd14b38..3d5c880716 100644 --- a/kernel/trunk/network/tcp_input.inc +++ b/kernel/trunk/network/tcp_input.inc @@ -1,6 +1,6 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; -;; Copyright (C) KolibriOS team 2004-2016. All rights reserved. ;; +;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;; ;; Distributed under terms of the GNU General Public License ;; ;; ;; ;; Part of the TCP/IP network stack for KolibriOS ;; @@ -85,6 +85,7 @@ locals dataoffset dd ? timestamp dd ? temp_bits db ? + device dd ? endl xor esi, esi @@ -105,8 +106,9 @@ endl push [esi + TCP_queue_entry.buffer_ptr] mov ebx, [esi + TCP_queue_entry.device_ptr] + mov [device], ebx mov ecx, [esi + TCP_queue_entry.segment_size] - mov edi, [esi + TCP_queue_entry.ip_ptr] ; ptr to ipv4 header + mov edi, [esi + TCP_queue_entry.ip_ptr] ; ptr to ipv4 header mov esi, [esi + TCP_queue_entry.segment_ptr] ; change esi last DEBUGF DEBUG_NETWORK_VERBOSE, "TCP_input: size=%u time=%d\n", ecx, [timer_ticks] @@ -1880,13 +1882,13 @@ endl .respond_seg_ack: mov cl, TH_RST - xor ebx, ebx ; FIXME: find a way to get the receiving device ptr + mov ebx, [device] call tcp_respond_segment jmp .drop_no_socket .respond_seg_syn: mov cl, TH_RST + TH_ACK - xor ebx, ebx ; FIXME: find a way to get the receiving device ptr + mov ebx, [device] call tcp_respond_segment jmp .drop_no_socket