Small fix in ICMP code

git-svn-id: svn://kolibrios.org@1165 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
hidnplayr 2009-09-18 14:15:37 +00:00
parent bb5be0798a
commit 1afe10aa6e
2 changed files with 8 additions and 7 deletions

View File

@ -401,7 +401,7 @@ IPv4_Handler:
DEBUGF 1,"IP_Handler - unknown protocol:%u\n",al DEBUGF 1,"IP_Handler - unknown protocol:%u\n",al
jmp .dump ret
.destroy_slot_pop: .destroy_slot_pop:
@ -572,6 +572,7 @@ IPv4_create_Packet:
.exit: .exit:
add esp, 16 add esp, 16
.exit_: .exit_:
DEBUGF 1,"Create IPv4 Packet - failed\n"
or edi, -1 or edi, -1
ret ret

View File

@ -277,7 +277,7 @@ ICMP_Handler: ;TODO: works only on pure ethernet right now !
DEBUGF 1,"ICMP_Handler - dumping\n" DEBUGF 1,"ICMP_Handler - dumping\n"
call kernel_free call kernel_free
add esp, 4 ; pop (balance stack) add esp, 8 ; pop (balance stack)
ret ret
@ -332,8 +332,7 @@ ICMP_Handler_fragments: ; works only on pure ethernet right now !
DEBUGF 1,"ICMP_Handler_fragments - end\n" DEBUGF 1,"ICMP_Handler_fragments - end\n"
call kernel_free call kernel_free
add esp, 4 ; pop (balance stack) add esp, 8 ; pop (balance stack)
ret ret
;----------------------------------------------------------------- ;-----------------------------------------------------------------
@ -366,11 +365,11 @@ ICMP_create_Packet:
call IPv4_create_Packet call IPv4_create_Packet
DEBUGF 1,"full icmp packet size: %u\n", ebx
cmp edi, -1 cmp edi, -1
je .exit je .exit
DEBUGF 1,"full icmp packet size: %u\n", ebx
pop eax pop eax
mov word [edi + ICMP_Packet.Type], ax ; Write both type and code bytes at once mov word [edi + ICMP_Packet.Type], ax ; Write both type and code bytes at once
pop eax pop eax
@ -401,7 +400,8 @@ ICMP_create_Packet:
ret ; Send the packet (create_packet routine outputs pointer to routine to send packet in eax) ret ; Send the packet (create_packet routine outputs pointer to routine to send packet in eax)
.exit: .exit:
add esp, 8 DEBUGF 1,"Creating ICMP Packet failed\n"
add esp, 3*4
ret ret