summaryrefslogtreecommitdiffstats
path: root/NetworkPkg/Ip6Dxe/Ip6Input.c
diff options
context:
space:
mode:
Diffstat (limited to 'NetworkPkg/Ip6Dxe/Ip6Input.c')
-rw-r--r--NetworkPkg/Ip6Dxe/Ip6Input.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/NetworkPkg/Ip6Dxe/Ip6Input.c b/NetworkPkg/Ip6Dxe/Ip6Input.c
index e53e0874b9..6aa55555b8 100644
--- a/NetworkPkg/Ip6Dxe/Ip6Input.c
+++ b/NetworkPkg/Ip6Dxe/Ip6Input.c
@@ -1,7 +1,7 @@
/** @file
IP6 internal functions to process the incoming packets.
- Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
This program and the accompanying materials
@@ -530,6 +530,7 @@ Ip6IpSecProcessPacket (
if (!mIpSec2Installed) {
goto ON_EXIT;
}
+ ASSERT (mIpSec != NULL);
Packet = *Netbuf;
RecycleEvent = NULL;
@@ -541,17 +542,6 @@ Ip6IpSecProcessPacket (
FragmentCount = Packet->BlockOpNum;
ZeroMem (&ZeroHead, sizeof (EFI_IP6_HEADER));
- if (mIpSec == NULL) {
- gBS->LocateProtocol (&gEfiIpSec2ProtocolGuid, NULL, (VOID **) &mIpSec);
-
- //
- // Check whether the ipsec protocol is available.
- //
- if (mIpSec == NULL) {
- goto ON_EXIT;
- }
- }
-
//
// Check whether the ipsec enable variable is set.
//