LIST_ENTRY *Next;\r
IP6_INTERFACE *IpIf;\r
IP6_DAD_ENTRY *DadEntry;\r
-\r
+ IP6_DELAY_JOIN_LIST *DelayNode;\r
+ \r
//\r
// Currently there are only two policies: Manual and Automatic. Regardless of\r
// what transition is going on, i.e., Manual -> Automatic and Automatic ->\r
\r
NET_LIST_FOR_EACH (Entry, &IpSb->Interfaces) {\r
//\r
- // remove all pending DAD entries for the global addresses.\r
+ // remove all pending delay node and DAD entries for the global addresses.\r
//\r
IpIf = NET_LIST_USER_STRUCT_S (Entry, IP6_INTERFACE, Link, IP6_INTERFACE_SIGNATURE);\r
\r
+ NET_LIST_FOR_EACH_SAFE (Entry2, Next, &IpIf->DelayJoinList) {\r
+ DelayNode = NET_LIST_USER_STRUCT (Entry2, IP6_DELAY_JOIN_LIST, Link);\r
+ if (!NetIp6IsLinkLocalAddr (&DelayNode->AddressInfo->Address)) {\r
+ RemoveEntryList (&DelayNode->Link);\r
+ FreePool (DelayNode);\r
+ }\r
+ }\r
+\r
NET_LIST_FOR_EACH_SAFE (Entry2, Next, &IpIf->DupAddrDetectList) {\r
DadEntry = NET_LIST_USER_STRUCT_S (Entry2, IP6_DAD_ENTRY, Link, IP6_DAD_ENTRY_SIGNATURE);\r
\r
NET_CHECK_SIGNATURE (IpIf, IP6_INTERFACE_SIGNATURE);\r
ASSERT (AddressInfo != NULL);\r
\r
+ //\r
+ // Do nothing if we have already started DAD on the address.\r
+ //\r
+ if (Ip6FindDADEntry (IpIf->Service, &AddressInfo->Address, NULL) != NULL) {\r
+ return EFI_SUCCESS;\r
+ }\r
+ \r
Status = EFI_SUCCESS;\r
IpSb = IpIf->Service;\r
DadXmits = &IpSb->Ip6ConfigInstance.DadXmits;\r
if (IsDAD && !IsMaintained) {\r
DupAddrDetect = Ip6FindDADEntry (IpSb, &Target, &IpIf);\r
if (DupAddrDetect != NULL) {\r
- if (DupAddrDetect->Transmit == 0) {\r
- //\r
- // The NS is from another node to performing DAD on the same address since\r
- // we haven't send out any NS yet. Fail DAD for the tentative address.\r
- //\r
- Ip6OnDADFinished (FALSE, IpIf, DupAddrDetect);\r
- Status = EFI_ICMP_ERROR;\r
- goto Exit;\r
- }\r
-\r
//\r
// Check the MAC address of the incoming packet.\r
//\r
//\r
Flag = FALSE;\r
if ((DupAddrDetect->Receive == 0) ||\r
- (DupAddrDetect->Transmit == DupAddrDetect->Receive)) {\r
+ (DupAddrDetect->Transmit <= DupAddrDetect->Receive)) {\r
Flag = TRUE;\r
}\r
\r