From e395aa6070939717a7fcd253e0dda11570c0c677 Mon Sep 17 00:00:00 2001 From: hidnplayr Date: Thu, 6 Jun 2013 05:19:15 +0000 Subject: [PATCH] bugfixes in ARP git-svn-id: svn://kolibrios.org@3609 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/network/ARP.inc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/kernel/trunk/network/ARP.inc b/kernel/trunk/network/ARP.inc index e3c49a2d63..f4feb91d5d 100644 --- a/kernel/trunk/network/ARP.inc +++ b/kernel/trunk/network/ARP.inc @@ -378,7 +378,6 @@ ARP_add_entry: cmp ecx, ARP_TABLE_SIZE ; list full ? jae .full - ; From this point on, we can only fail if IP has a static entry, or if table is corrupt. inc [ARP_entries_num + 4*edi] ; assume we will succeed @@ -387,7 +386,7 @@ ARP_add_entry: xor ecx, ecx imul edi, ARP_TABLE_SIZE*sizeof.ARP_entry add edi, ARP_table - mov eax, [edi + ARP_entry.IP] + mov eax, [esi + ARP_entry.IP] .loop: cmp [edi + ARP_entry.Status], ARP_NO_ENTRY ; is this slot empty? je .add @@ -500,7 +499,9 @@ ARP_IP_to_MAC: mov ecx, [ARP_entries_num + 4*edi] test ecx, ecx jz .not_in_list - mov esi, ARP_table + ARP_entry.IP + mov esi, edi + imul esi, sizeof.ARP_entry * ARP_TABLE_SIZE + add esi, ARP_table + ARP_entry.IP .scan_loop: cmp [esi], eax je .found_it @@ -584,7 +585,7 @@ end if ; ; ARP_API ; -; This function is called by system function 75 +; This function is called by system function 76 ; ; IN: subfunction number in bl ; device number in bh