summaryrefslogtreecommitdiff
path: root/NetworkPkg/Ip6Dxe/Ip6Nd.c
diff options
context:
space:
mode:
authorFu Siyuan <siyuan.fu@intel.com>2015-04-29 05:47:03 +0000
committersfu5 <sfu5@Edk2>2015-04-29 05:47:03 +0000
commitcca5e4221b3c345eb79a3542bfcd10d8160b303d (patch)
treeed2560fa53126f36c0b1a8a6f9a5f31232c3f94c /NetworkPkg/Ip6Dxe/Ip6Nd.c
parentba2c05279195e543a3b5875a14de1f952ad8b5f8 (diff)
downloadedk2-platforms-cca5e4221b3c345eb79a3542bfcd10d8160b303d.tar.xz
Remove duplicate DAD entry in IP6 driver to fix DAD fail issue.
The IP6 driver may create duplicate IP6_DAD_ENTRY in DupAddrDetectList in some situation like: 1. Address policy switch but not clear the delay node list, OR 2. Set manual address repeatedly before the previous DAD is finished. The NS sent out by duplicate DAD entry will mix up with the loop back multicast packet, result in DAD fail. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17263 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'NetworkPkg/Ip6Dxe/Ip6Nd.c')
-rw-r--r--NetworkPkg/Ip6Dxe/Ip6Nd.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/NetworkPkg/Ip6Dxe/Ip6Nd.c b/NetworkPkg/Ip6Dxe/Ip6Nd.c
index 9f30f9b20e..2c8be42f09 100644
--- a/NetworkPkg/Ip6Dxe/Ip6Nd.c
+++ b/NetworkPkg/Ip6Dxe/Ip6Nd.c
@@ -982,6 +982,13 @@ Ip6InitDADProcess (
NET_CHECK_SIGNATURE (IpIf, IP6_INTERFACE_SIGNATURE);
ASSERT (AddressInfo != NULL);
+ //
+ // Do nothing if we have already started DAD on the address.
+ //
+ if (Ip6FindDADEntry (IpIf->Service, &AddressInfo->Address, NULL) != NULL) {
+ return EFI_SUCCESS;
+ }
+
Status = EFI_SUCCESS;
IpSb = IpIf->Service;
DadXmits = &IpSb->Ip6ConfigInstance.DadXmits;
@@ -1577,16 +1584,6 @@ Ip6ProcessNeighborSolicit (
if (IsDAD && !IsMaintained) {
DupAddrDetect = Ip6FindDADEntry (IpSb, &Target, &IpIf);
if (DupAddrDetect != NULL) {
- if (DupAddrDetect->Transmit == 0) {
- //
- // The NS is from another node to performing DAD on the same address since
- // we haven't send out any NS yet. Fail DAD for the tentative address.
- //
- Ip6OnDADFinished (FALSE, IpIf, DupAddrDetect);
- Status = EFI_ICMP_ERROR;
- goto Exit;
- }
-
//
// Check the MAC address of the incoming packet.
//
@@ -2863,7 +2860,7 @@ Ip6NdFasterTimerTicking (
//
Flag = FALSE;
if ((DupAddrDetect->Receive == 0) ||
- (DupAddrDetect->Transmit == DupAddrDetect->Receive)) {
+ (DupAddrDetect->Transmit <= DupAddrDetect->Receive)) {
Flag = TRUE;
}