bugfixes in ARP

git-svn-id: svn://kolibrios.org@3609 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
hidnplayr 2013-06-06 05:19:15 +00:00
parent da53db0ae7
commit e395aa6070

View File

@ -378,7 +378,6 @@ ARP_add_entry:
cmp ecx, ARP_TABLE_SIZE ; list full ? cmp ecx, ARP_TABLE_SIZE ; list full ?
jae .full jae .full
; From this point on, we can only fail if IP has a static entry, or if table is corrupt. ; 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 inc [ARP_entries_num + 4*edi] ; assume we will succeed
@ -387,7 +386,7 @@ ARP_add_entry:
xor ecx, ecx xor ecx, ecx
imul edi, ARP_TABLE_SIZE*sizeof.ARP_entry imul edi, ARP_TABLE_SIZE*sizeof.ARP_entry
add edi, ARP_table add edi, ARP_table
mov eax, [edi + ARP_entry.IP] mov eax, [esi + ARP_entry.IP]
.loop: .loop:
cmp [edi + ARP_entry.Status], ARP_NO_ENTRY ; is this slot empty? cmp [edi + ARP_entry.Status], ARP_NO_ENTRY ; is this slot empty?
je .add je .add
@ -500,7 +499,9 @@ ARP_IP_to_MAC:
mov ecx, [ARP_entries_num + 4*edi] mov ecx, [ARP_entries_num + 4*edi]
test ecx, ecx test ecx, ecx
jz .not_in_list 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: .scan_loop:
cmp [esi], eax cmp [esi], eax
je .found_it je .found_it
@ -584,7 +585,7 @@ end if
; ;
; ARP_API ; ARP_API
; ;
; This function is called by system function 75 ; This function is called by system function 76
; ;
; IN: subfunction number in bl ; IN: subfunction number in bl
; device number in bh ; device number in bh