]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/IpSecDxe/Ikev2/Exchange.c
NetworkPkg: Fix hang issue after system reconnected when IPSec has set up
[mirror_edk2.git] / NetworkPkg / IpSecDxe / Ikev2 / Exchange.c
index 37f9667d3d1ec1bb3bc44072e24b32b3c6a907e6..9d58ab0a46f6b46bb2f58fb3e257a19d042e07a5 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The general interfaces of the IKEv2.\r
 \r
-  Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2015, 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
@@ -330,7 +330,7 @@ Ikev2NegotiateInfo (
     //\r
     // Send out the Packet\r
     //\r
-    if (UdpService != NULL) {\r
+    if (UdpService != NULL && UdpService->Output != NULL) {\r
       Status = Ikev2SendIkePacket (UdpService, (UINT8 *) SaCommon, IkePacket, 0);\r
 \r
       if (EFI_ERROR (Status)) {\r
@@ -357,7 +357,7 @@ Ikev2NegotiateInfo (
       //\r
       // Send out the Packet\r
       //\r
-      if (UdpService != NULL) {\r
+      if (UdpService != NULL && UdpService->Output != NULL) {\r
         Status = Ikev2SendIkePacket (UdpService, (UINT8 *) &ChildSaSession->SessionCommon, IkePacket, 0);\r
 \r
         if (EFI_ERROR (Status)) {\r