Bug fix: IpSec driver treats BOOLEAN as EFI_STATUS in error handling code.
authorFu Siyuan <siyuan.fu@intel.com>
Mon, 6 Jan 2014 03:01:09 +0000 (03:01 +0000)
committersfu5 <sfu5@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 6 Jan 2014 03:01:09 +0000 (03:01 +0000)
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Dong, Guo <guo.dong@intel.com>
Reviewed-by: Jin, Eric <eric.jin@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15049 6f19259b-4bc3-4df7-8a09-765794883524

NetworkPkg/IpSecDxe/Ikev2/Exchange.c

index ffa5382..7634d11 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The general interfaces of the IKEv2.\r
 \r
-  Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2014, 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
@@ -467,8 +467,7 @@ Ikev2HandleSa (
   //\r
   // Validate the IKE packet header.\r
   //\r
-  Status = Ikev2ValidateHeader (IkeSaSession, IkePacket->Header);\r
-  if (EFI_ERROR (Status)) {\r
+  if (!Ikev2ValidateHeader (IkeSaSession, IkePacket->Header)) {\r
     //\r
     // Drop the packet if invalid IKE header.\r
     //\r