Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Ouyang Qian <qian.ouyang@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14169
6f19259b-4bc3-4df7-8a09-
765794883524
/** @file\r
Dhcp6 internal functions implementation.\r
\r
/** @file\r
Dhcp6 internal functions implementation.\r
\r
- Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
// Select the advertisement received before.\r
//\r
Status = Dhcp6SelectAdvertiseMsg (Instance, Instance->AdSelect);\r
// Select the advertisement received before.\r
//\r
Status = Dhcp6SelectAdvertiseMsg (Instance, Instance->AdSelect);\r
- if (EFI_ERROR (Status)) {\r
+ if (Status == EFI_ABORTED) {\r
+ goto ON_CLOSE;\r
+ } else if (EFI_ERROR (Status)) {\r
TxCb->RetryCnt++;\r
}\r
return;\r
TxCb->RetryCnt++;\r
}\r
return;\r
// Check whether overflow the max retry count limit for this packet\r
//\r
if (TxCb->RetryCtl.Mrc != 0 && TxCb->RetryCtl.Mrc < TxCb->RetryCnt) {\r
// Check whether overflow the max retry count limit for this packet\r
//\r
if (TxCb->RetryCtl.Mrc != 0 && TxCb->RetryCtl.Mrc < TxCb->RetryCnt) {\r
+ Status = EFI_NO_RESPONSE;\r
// Check whether overflow the max retry duration for this packet\r
//\r
if (TxCb->RetryCtl.Mrd != 0 && TxCb->RetryCtl.Mrd <= TxCb->RetryLos) {\r
// Check whether overflow the max retry duration for this packet\r
//\r
if (TxCb->RetryCtl.Mrd != 0 && TxCb->RetryCtl.Mrd <= TxCb->RetryLos) {\r
+ Status = EFI_NO_RESPONSE;\r
- if (TxCb->TxPacket->Dhcp6.Header.MessageType == Dhcp6MsgInfoRequest ||\r
+ if (TxCb->TxPacket != NULL &&\r
+ (TxCb->TxPacket->Dhcp6.Header.MessageType == Dhcp6MsgInfoRequest ||\r
TxCb->TxPacket->Dhcp6.Header.MessageType == Dhcp6MsgRenew ||\r
TxCb->TxPacket->Dhcp6.Header.MessageType == Dhcp6MsgRenew ||\r
- TxCb->TxPacket->Dhcp6.Header.MessageType == Dhcp6MsgConfirm\r
+ TxCb->TxPacket->Dhcp6.Header.MessageType == Dhcp6MsgConfirm)\r
) {\r
//\r
// The failure of renew/Confirm will still switch to the bound state.\r
) {\r
//\r
// The failure of renew/Confirm will still switch to the bound state.\r
//\r
// The failure of the others will terminate current state machine if timeout.\r
//\r
//\r
// The failure of the others will terminate current state machine if timeout.\r
//\r
- Dhcp6CleanupSession (Instance, EFI_NO_RESPONSE);\r
+ Dhcp6CleanupSession (Instance, Status);\r