From c396222f34ecc4c165407abecf453daf934e9d78 Mon Sep 17 00:00:00 2001 From: Art Yerkes Date: Mon, 24 Jan 2005 16:58:53 +0000 Subject: [PATCH] Minor fix to ICMP receive. svn path=/trunk/; revision=13249 --- reactos/drivers/lib/ip/network/ip.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/reactos/drivers/lib/ip/network/ip.c b/reactos/drivers/lib/ip/network/ip.c index d2ccd11da3a..4b6871efc0c 100644 --- a/reactos/drivers/lib/ip/network/ip.c +++ b/reactos/drivers/lib/ip/network/ip.c @@ -152,6 +152,10 @@ VOID IPDispatchProtocol( /* Call the appropriate protocol handler */ (*ProtocolTable[Protocol])(Interface, IPPacket); + /* Special case for ICMP -- ICMP can be caught by a SOCK_RAW but also + * must be handled here. */ + if( Protocol == IPPROTO_ICMP ) + ICMPReceive( Interface, IPPacket ); } @@ -401,9 +405,6 @@ NTSTATUS IPStartup(PUNICODE_STRING RegistryPath) for (i = 0; i < IP_PROTOCOL_TABLE_SIZE; i++) IPRegisterProtocol(i, DefaultProtocolHandler); - /* Register network level protocol receive handlers */ - IPRegisterProtocol(IPPROTO_ICMP, ICMPReceive); - /* Initialize NTE list and protecting lock */ InitializeListHead(&NetTableListHead); TcpipInitializeSpinLock(&NetTableListLock);