]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/Application/IpsecConfig/Match.c
NetworkPkg: Fix unspecified address use case in IpsecConfig
[mirror_edk2.git] / NetworkPkg / Application / IpsecConfig / Match.c
index 7ac1cb5c5a7336d5bb5586569a6a6ff7b0814b3e..2ee763e60748bc0bd346108985a64b7537bd2ee6 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The implementation of match policy entry function in IpSecConfig application.\r
 \r
-  Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2016, 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
@@ -63,7 +63,7 @@ MatchSpdEntry (
   BOOLEAN    Match;\r
 \r
   Match = FALSE;\r
-  if (Indexer->Name != NULL) {\r
+  if (!IsMemoryZero (Indexer->Name, MAX_PEERID_LEN)) {\r
     if ((Data->Name != NULL) && (AsciiStrCmp ((CHAR8 *) Indexer->Name, (CHAR8 *) Data->Name) == 0)) {\r
       Match = TRUE;\r
     }\r
@@ -82,7 +82,7 @@ MatchSpdEntry (
   Find the matching SAD with Indexer.\r
 \r
   @param[in] SaId       The pointer to the EFI_IPSEC_SA_ID structure.\r
-  @param[in] Data       The pointer to the EFI_IPSEC_SA_DATA structure.\r
+  @param[in] Data       The pointer to the EFI_IPSEC_SA_DATA2 structure.\r
   @param[in] Indexer    The pointer to the SPD_ENTRY_INDEXER structure.\r
 \r
   @retval TRUE     The matched SAD is found.\r