summaryrefslogtreecommitdiff
path: root/NetworkPkg
diff options
context:
space:
mode:
authorsfu5 <sfu5@6f19259b-4bc3-4df7-8a09-765794883524>2013-03-11 07:49:41 +0000
committersfu5 <sfu5@6f19259b-4bc3-4df7-8a09-765794883524>2013-03-11 07:49:41 +0000
commitb9f256bbe900626f0dd695ea2ccae21956564b88 (patch)
tree803a35b5b05f92399fb117dbc45ce17a03b4a74e /NetworkPkg
parentf402291bf98d9e380f00d35033570e851f5318b2 (diff)
downloadedk2-platforms-b9f256bbe900626f0dd695ea2ccae21956564b88.tar.xz
Update DHCP6 driver to handle EFI_DHCP6_CALLBACK return status correctly.
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
Diffstat (limited to 'NetworkPkg')
-rw-r--r--NetworkPkg/Dhcp6Dxe/Dhcp6Io.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/NetworkPkg/Dhcp6Dxe/Dhcp6Io.c b/NetworkPkg/Dhcp6Dxe/Dhcp6Io.c
index 962d9387ca..1da31dcc54 100644
--- a/NetworkPkg/Dhcp6Dxe/Dhcp6Io.c
+++ b/NetworkPkg/Dhcp6Dxe/Dhcp6Io.c
@@ -1,7 +1,7 @@
/** @file
Dhcp6 internal functions implementation.
- Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2009 - 2013, 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
@@ -2981,7 +2981,9 @@ Dhcp6OnTimerTick (
// Select the advertisement received before.
//
Status = Dhcp6SelectAdvertiseMsg (Instance, Instance->AdSelect);
- if (EFI_ERROR (Status)) {
+ if (Status == EFI_ABORTED) {
+ goto ON_CLOSE;
+ } else if (EFI_ERROR (Status)) {
TxCb->RetryCnt++;
}
return;
@@ -2997,6 +2999,7 @@ Dhcp6OnTimerTick (
// Check whether overflow the max retry count limit for this packet
//
if (TxCb->RetryCtl.Mrc != 0 && TxCb->RetryCtl.Mrc < TxCb->RetryCnt) {
+ Status = EFI_NO_RESPONSE;
goto ON_CLOSE;
}
@@ -3004,6 +3007,7 @@ Dhcp6OnTimerTick (
// Check whether overflow the max retry duration for this packet
//
if (TxCb->RetryCtl.Mrd != 0 && TxCb->RetryCtl.Mrd <= TxCb->RetryLos) {
+ Status = EFI_NO_RESPONSE;
goto ON_CLOSE;
}
@@ -3093,9 +3097,10 @@ Dhcp6OnTimerTick (
ON_CLOSE:
- if (TxCb->TxPacket->Dhcp6.Header.MessageType == Dhcp6MsgInfoRequest ||
+ if (TxCb->TxPacket != NULL &&
+ (TxCb->TxPacket->Dhcp6.Header.MessageType == Dhcp6MsgInfoRequest ||
TxCb->TxPacket->Dhcp6.Header.MessageType == Dhcp6MsgRenew ||
- TxCb->TxPacket->Dhcp6.Header.MessageType == Dhcp6MsgConfirm
+ TxCb->TxPacket->Dhcp6.Header.MessageType == Dhcp6MsgConfirm)
) {
//
// The failure of renew/Confirm will still switch to the bound state.
@@ -3120,6 +3125,6 @@ Dhcp6OnTimerTick (
//
// The failure of the others will terminate current state machine if timeout.
//
- Dhcp6CleanupSession (Instance, EFI_NO_RESPONSE);
+ Dhcp6CleanupSession (Instance, Status);
}
}