From ae97201c55603b69289c5d2349238ea97b2cd35e Mon Sep 17 00:00:00 2001 From: "Fu, Siyuan" Date: Thu, 18 Sep 2014 11:44:36 +0000 Subject: 1. Update PXE driver to support PXEv6 boot cross subnet. 2. Update IP6 driver to use previous configured prefix length if a pre-exist IP6 address with unspecified prefix length. 3. Add NULL check for Dhcp protocol pointer before it decline the address in Ip6ConfigSetStatefulAddrCallback() function. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu, Siyuan Reviewed-By: Ye, Ting (ting.ye@intel.com) Reviewed-By: Wu, Jiaxin git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16131 6f19259b-4bc3-4df7-8a09-765794883524 --- NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'NetworkPkg/Ip6Dxe') diff --git a/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c b/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c index ddb8dcd..9a1e3d0 100644 --- a/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c +++ b/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c @@ -1,7 +1,7 @@ /** @file The implementation of EFI IPv6 Configuration Protocol. - Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.
+ Copyright (c) 2009 - 2014, 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 @@ -1013,6 +1013,14 @@ Ip6ConfigSetMaunualAddress ( ); // + // If the new address's prefix length is not specified, just use the previous configured + // prefix length for this address. + // + if (NewAddress->PrefixLength == 0) { + NewAddress->PrefixLength = CurrentAddrInfo->PrefixLength; + } + + // // This manual address is already in use, see whether prefix length is changed. // if (NewAddress->PrefixLength != CurrentAddrInfo->PrefixLength) { @@ -1594,11 +1602,13 @@ Ip6ConfigSetStatefulAddrCallback ( // // Decline those duplicates. // - Instance->Dhcp6->Decline ( - Instance->Dhcp6, - Instance->DeclineAddressCount, - Instance->DeclineAddress - ); + if (Instance->Dhcp6 != NULL) { + Instance->Dhcp6->Decline ( + Instance->Dhcp6, + Instance->DeclineAddressCount, + Instance->DeclineAddress + ); + } } if (Instance->DeclineAddress != NULL) { -- cgit v1.1