net-branch:

Fix crash in udp.inc when arp-entry is not found.
Fixed bug in deleting of arp entry's

git-svn-id: svn://kolibrios.org@1485 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
hidnplayr 2010-06-07 16:10:07 +00:00
parent 9cbcb28cd1
commit 721a4859b3
2 changed files with 3 additions and 4 deletions

View File

@ -436,20 +436,19 @@ ARP_del_entry:
cmp esi, [NumARP]
jge .error
DEBUGF 1,"deleting the entry..\n"
imul esi, ARP_ENTRY.size
mov ecx, (ARP_TABLE_SIZE - 1) * ARP_ENTRY.size
sub ecx, esi
lea edi, [ebx + esi] ;edi=ptr to entry that should be deleted
lea edi, [ARPTable + esi] ;edi=ptr to entry that should be deleted
lea esi, [edi + ARP_ENTRY.size] ;esi=ptr to next entry
shr ecx,1 ;ecx/2 => ARP_ENTRY_SIZE MUST BE EVEN NUMBER!
rep movsw
dec [NumARP] ;decrease arp-entries counter
DEBUGF 1,"ARP entry deleted\n"
.error:
ret

View File

@ -267,7 +267,7 @@ UDP_socket_send:
.fail:
; todo: queue the packet
add esp, 8+12+8
add esp, 8+8
ret