aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2020-09-30 21:56:01 +0000
committerFilip Tehlar <ftehlar@cisco.com>2020-09-30 21:56:01 +0000
commit98d6f2971e2ed40b5c5bb96a9d6c769225a302c4 (patch)
treed8e967d43a6db1f520c08bf3a64785b5f48b4432 /src/plugins
parent3434cb8fe379791050a85617775bb518cdd0eb5d (diff)
ikev2: fix issue when decrypting packet with no keys
Type: fix Change-Id: I0e615d5089587992012a0f280ee902b2906f21c2 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/ikev2/ikev2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/ikev2/ikev2.c b/src/plugins/ikev2/ikev2.c
index 593d616593d..63e89b5cf5e 100644
--- a/src/plugins/ikev2/ikev2.c
+++ b/src/plugins/ikev2/ikev2.c
@@ -915,7 +915,7 @@ ikev2_decrypt_sk_payload (ikev2_sa_t * sa, ike_header_t * ike,
ikev2_sa_get_td_for_type (sa->r_proposals, IKEV2_TRANSFORM_TYPE_ENCR);
int is_aead = tr_encr->encr_type == IKEV2_TRANSFORM_ENCR_TYPE_AES_GCM_16;
- if ((!sa->sk_ar || !sa->sk_ai) && !is_aead)
+ if (((!sa->sk_ar || !sa->sk_ai) && !is_aead) || (!sa->sk_ei || !sa->sk_er))
return 0;
if (rlen <= sizeof (*ike))