/** @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
// 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
// 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
goto ON_CLOSE;\r
}\r
\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
goto ON_CLOSE;\r
}\r
\r
\r
ON_CLOSE:\r
\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 == 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
// The failure of the others will terminate current state machine if timeout.\r
//\r
- Dhcp6CleanupSession (Instance, EFI_NO_RESPONSE);\r
+ Dhcp6CleanupSession (Instance, Status);\r
}\r
}\r