From ed2bfecbcd6eed998be628b310bf89705fdb586c Mon Sep 17 00:00:00 2001 From: sfu5 Date: Wed, 4 Jul 2012 04:34:10 +0000 Subject: Update PXE driver to wait for IPv6 duplicate address detection to finish. Signed-off-by: Fu Siyuan Reviewed-by: Ye Ting Reviewed-by: qianouyang git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13485 6f19259b-4bc3-4df7-8a09-765794883524 --- NetworkPkg/Dhcp6Dxe/Dhcp6Impl.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'NetworkPkg/Dhcp6Dxe/Dhcp6Impl.c') diff --git a/NetworkPkg/Dhcp6Dxe/Dhcp6Impl.c b/NetworkPkg/Dhcp6Dxe/Dhcp6Impl.c index 3e73976ddb..4bed614d2b 100644 --- a/NetworkPkg/Dhcp6Dxe/Dhcp6Impl.c +++ b/NetworkPkg/Dhcp6Dxe/Dhcp6Impl.c @@ -1,7 +1,7 @@ /** @file This EFI_DHCP6_PROTOCOL interface implementation. - Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.
+ Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -200,13 +200,13 @@ EfiDhcp6Stop ( ASSERT (Instance->IaCb.Ia != NULL); // - // The instance has already been stopped. + // No valid REPLY message received yet, cleanup this instance directly. // if (Instance->IaCb.Ia->State == Dhcp6Init || Instance->IaCb.Ia->State == Dhcp6Selecting || Instance->IaCb.Ia->State == Dhcp6Requesting ) { - return Status; + goto ON_EXIT; } // @@ -215,7 +215,10 @@ EfiDhcp6Stop ( OldTpl = gBS->RaiseTPL (TPL_CALLBACK); Instance->UdpSts = EFI_ALREADY_STARTED; - Dhcp6SendReleaseMsg (Instance, Instance->IaCb.Ia); + Status = Dhcp6SendReleaseMsg (Instance, Instance->IaCb.Ia); + if (EFI_ERROR (Status)) { + goto ON_EXIT; + } gBS->RestoreTPL (OldTpl); @@ -229,7 +232,8 @@ EfiDhcp6Stop ( } Status = Instance->UdpSts; } - + +ON_EXIT: // // Clean up the session data for the released Ia. // -- cgit v1.2.3