diff --git a/NetworkPkg/IpSecDxe/Ikev2/Exchange.c b/NetworkPkg/IpSecDxe/Ikev2/Exchange.c index ffa53824d0..7634d11a2a 100644 --- a/NetworkPkg/IpSecDxe/Ikev2/Exchange.c +++ b/NetworkPkg/IpSecDxe/Ikev2/Exchange.c @@ -1,7 +1,7 @@ /** @file The general interfaces of the IKEv2. - Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.
+ Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -467,8 +467,7 @@ Ikev2HandleSa ( // // Validate the IKE packet header. // - Status = Ikev2ValidateHeader (IkeSaSession, IkePacket->Header); - if (EFI_ERROR (Status)) { + if (!Ikev2ValidateHeader (IkeSaSession, IkePacket->Header)) { // // Drop the packet if invalid IKE header. //