v2: * Update the copyright year and conditional judgment for removing. When use "-e" to edit SPD database, the corresponding SA entry will be updated to the sas list of the new SPD entry. But before that, all of them should be removed from the original sas list. If not, the list will be broken into infinite loop.
Cc: Ye Ting <ting...@intel.com> Cc: Fu Siyuan <siyuan...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu <jiaxin...@intel.com> --- NetworkPkg/IpSecDxe/IpSecConfigImpl.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/NetworkPkg/IpSecDxe/IpSecConfigImpl.c b/NetworkPkg/IpSecDxe/IpSecConfigImpl.c index 6eabfe4..bd49245 100644 --- a/NetworkPkg/IpSecDxe/IpSecConfigImpl.c +++ b/NetworkPkg/IpSecDxe/IpSecConfigImpl.c @@ -1,9 +1,9 @@ /** @file The implementation of IPSEC_CONFIG_PROTOCOL. - Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR> + Copyright (c) 2009 - 2015, 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 which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php. @@ -1197,10 +1197,13 @@ SetSpdEntry ( if (CompareSaId ( (EFI_IPSEC_CONFIG_SELECTOR *) &SpdData->SaId[Index], (EFI_IPSEC_CONFIG_SELECTOR *) SadEntry->Id )) { + if (SadEntry->Data->SpdEntry != NULL) { + RemoveEntryList (&SadEntry->BySpd); + } InsertTailList (&SpdEntry->Data->Sas, &SadEntry->BySpd); SadEntry->Data->SpdEntry = SpdEntry; DuplicateSpdSelector ( (EFI_IPSEC_CONFIG_SELECTOR *)SadEntry->Data->SpdSelector, (EFI_IPSEC_CONFIG_SELECTOR *)SpdEntry->Selector, -- 1.9.5.msysgit.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel