diff --git a/NetworkPkg/IpSecDxe/Ikev2/Sa.c b/NetworkPkg/IpSecDxe/Ikev2/Sa.c index 4cbfac33b1..f9421ed4e8 100644 --- a/NetworkPkg/IpSecDxe/Ikev2/Sa.c +++ b/NetworkPkg/IpSecDxe/Ikev2/Sa.c @@ -287,9 +287,8 @@ Ikev2InitPskParser ( // as first payload and all other payloads unchanged. // if (IkeSaSession->SessionCommon.IsInitiator) { - if (NotifyPayload != NULL) { - Status = Ikev2ParserNotifyCookiePayload (NotifyPayload, IkeSaSession); - return Status; + if (NotifyPayload != NULL && !EFI_ERROR(Ikev2ParserNotifyCookiePayload (NotifyPayload, IkeSaSession))) { + return EFI_SUCCESS; } }