]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/Ip6Dxe/Ip6Input.c
BaseTools: Update Makefile to work at absolute path
[mirror_edk2.git] / NetworkPkg / Ip6Dxe / Ip6Input.c
index cf88884e381b20f088b1b791d9540051143ba1f2..6aa55555b81beff046f58cd117282e5a2a701ff8 100644 (file)
@@ -1,7 +1,8 @@
 /** @file\r
   IP6 internal functions to process the incoming packets.\r
 \r
-  Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
+  (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<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
@@ -525,6 +526,12 @@ Ip6IpSecProcessPacket (
   EFI_IP6_HEADER            ZeroHead;\r
 \r
   Status        = EFI_SUCCESS;\r
+\r
+  if (!mIpSec2Installed) {\r
+    goto ON_EXIT;\r
+  }\r
+  ASSERT (mIpSec != NULL);\r
+  \r
   Packet        = *Netbuf;\r
   RecycleEvent  = NULL;\r
   IpSecWrap     = NULL;\r
@@ -535,17 +542,6 @@ Ip6IpSecProcessPacket (
   FragmentCount = Packet->BlockOpNum;\r
   ZeroMem (&ZeroHead, sizeof (EFI_IP6_HEADER));\r
 \r
-  if (mIpSec == NULL) {\r
-    gBS->LocateProtocol (&gEfiIpSec2ProtocolGuid, NULL, (VOID **) &mIpSec);\r
-\r
-    //\r
-    // Check whether the ipsec protocol is available.\r
-    //\r
-    if (mIpSec == NULL) {\r
-      goto ON_EXIT;\r
-    }\r
-  }\r
-\r
   //\r
   // Check whether the ipsec enable variable is set.\r
   //\r