]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/IpSecDxe/IpSecMain.c
NetworkPkg: Handling timeout case in httpboot driver
[mirror_edk2.git] / NetworkPkg / IpSecDxe / IpSecMain.c
index 247dab33815a9003a4939e3d19523890692f299e..a2fefa70d7127b009ec5f6e11fbb0ba642dd9eb9 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The mian interface of IPsec Protocol.\r
 \r
-  Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2011, 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
@@ -25,7 +25,7 @@ EFI_IPSEC2_PROTOCOL  mIpSecInstance = { IpSecProcess, NULL, TRUE };
   The behavior is that it can perform one of the following actions:\r
   bypass the packet, discard the packet, or protect the packet.\r
 \r
-  @param[in]      This             Pointer to the EFI_IPSEC_PROTOCOL instance.\r
+  @param[in]      This             Pointer to the EFI_IPSEC2_PROTOCOL instance.\r
   @param[in]      NicHandle        Instance of the network interface.\r
   @param[in]      IpVersion        IPV4 or IPV6.\r
   @param[in, out] IpHead           Pointer to the IP Header.\r
@@ -70,6 +70,13 @@ IpSecProcess (
   UINT8                  OldLastHead;\r
   BOOLEAN                IsOutbound;\r
 \r
+  if (OptionsBuffer == NULL || \r
+      OptionsLength == NULL || \r
+      FragmentTable == NULL || \r
+      FragmentCount == NULL\r
+      ) {\r
+    return EFI_INVALID_PARAMETER;\r
+  }\r
   Private         = IPSEC_PRIVATE_DATA_FROM_IPSEC (This);\r
   IpPayload       = (*FragmentTable)[0].FragmentBuffer;\r
   IsOutbound      = (BOOLEAN) ((TrafficDirection == EfiIPsecOutBound) ? TRUE : FALSE);\r