summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhhuan13 <hhuan13@6f19259b-4bc3-4df7-8a09-765794883524>2011-03-01 06:11:24 +0000
committerhhuan13 <hhuan13@6f19259b-4bc3-4df7-8a09-765794883524>2011-03-01 06:11:24 +0000
commit4aea1845b214d6e8fc8123892b601d48040d7311 (patch)
tree41eb1d18883952c3874d9b8bd69ac7cb2e32558c
parent1275b3eddde9f864c2da5a8c7f17749a146a90e0 (diff)
downloadedk2-4aea1845b214d6e8fc8123892b601d48040d7311.tar.gz
1. Fix a bug to drop ICMPv6 error message in case destination address is AnyCast type.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/branches/UDK2010@11341 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--NetworkPkg/Ip6Dxe/Ip6Output.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/NetworkPkg/Ip6Dxe/Ip6Output.c b/NetworkPkg/Ip6Dxe/Ip6Output.c
index baa4904fc9..df6e5a00b2 100644
--- a/NetworkPkg/Ip6Dxe/Ip6Output.c
+++ b/NetworkPkg/Ip6Dxe/Ip6Output.c
@@ -1,7 +1,7 @@
/** @file
The internal functions and routines to transmit the IP6 packet.
- Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -603,15 +603,16 @@ Ip6Output (
break;
case IP6_ICMP:
+ IcmpHead = (IP6_ICMP_HEAD *) NetbufGetByte (Packet, 0, NULL);
+ ASSERT (IcmpHead != NULL);
+
//
- // Don't send ICMP packet to an IPv6 anycast address.
+ // Don't send ICMP packet to an IPv6 anycast address in case ICMP Error message.
//
- if (Ip6IsAnycast (IpSb, &Head->DestinationAddress)) {
+ if (Ip6IsAnycast (IpSb, &Head->DestinationAddress) && (IcmpHead->Type <= ICMP_V6_ERROR_MAX)) {
return EFI_INVALID_PARAMETER;
}
- IcmpHead = (IP6_ICMP_HEAD *) NetbufGetByte (Packet, 0, NULL);
- ASSERT (IcmpHead != NULL);
if (IcmpHead->Checksum == 0) {
Checksum = &IcmpHead->Checksum;
}