diff options
author | Filip Tehlar <ftehlar@cisco.com> | 2020-09-30 21:56:01 +0000 |
---|---|---|
committer | Dave Wallace <dwallacelf@gmail.com> | 2020-10-14 15:13:40 +0000 |
commit | 94f5335efba1f396a2a96ecb3b7ac0636a01177b (patch) | |
tree | 42a1026b91d6ce5c64267e0f2395a37fb8e14a2c | |
parent | 93a786b4d7be2d3cdf517b974a5f215b0daaac8f (diff) |
ikev2: fix issue when decrypting packet with no keys
Type: fix
Change-Id: I0e615d5089587992012a0f280ee902b2906f21c2
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
-rw-r--r-- | src/plugins/ikev2/ikev2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/ikev2/ikev2.c b/src/plugins/ikev2/ikev2.c index 96b8e7d9b23..bfad2adbd9e 100644 --- a/src/plugins/ikev2/ikev2.c +++ b/src/plugins/ikev2/ikev2.c @@ -858,7 +858,7 @@ ikev2_decrypt_sk_payload (ikev2_sa_t * sa, ike_header_t * ike, u8 * payload, 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; while (p < len && |