summaryrefslogtreecommitdiff
path: root/sbin/iked/ikev2_pld.c
diff options
context:
space:
mode:
authortobhe <tobhe@cvs.openbsd.org>2020-09-16 21:37:36 +0000
committertobhe <tobhe@cvs.openbsd.org>2020-09-16 21:37:36 +0000
commitacb9e6b38f7641e071bd548338ce93c9b3314e82 (patch)
tree97b0dca1a183f0ead93360cdce04d9577a2d103a /sbin/iked/ikev2_pld.c
parent9e307b29862ebf9bc1d5e591bf93c6115aee9352 (diff)
Move all the EAP logic from a single branch in the message parsing code to
somewhere past successful message verification, closer to where the other exchanges are handled. EAP is stll special, but this fits a lot better into the overall architecture. Tested with iOS, Stronswan and Windows ok patrick@ sthen@
Diffstat (limited to 'sbin/iked/ikev2_pld.c')
-rw-r--r--sbin/iked/ikev2_pld.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sbin/iked/ikev2_pld.c b/sbin/iked/ikev2_pld.c
index f4196af0ff6..0c0b17e4e29 100644
--- a/sbin/iked/ikev2_pld.c
+++ b/sbin/iked/ikev2_pld.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ikev2_pld.c,v 1.94 2020/08/20 19:28:01 tobhe Exp $ */
+/* $OpenBSD: ikev2_pld.c,v 1.95 2020/09/16 21:37:35 tobhe Exp $ */
/*
* Copyright (c) 2019 Tobias Heider <tobias.heider@stusta.de>
@@ -2005,8 +2005,9 @@ ikev2_pld_eap(struct iked *env, struct ikev2_payload *pld,
eap->eap_id, betoh16(eap->eap_length),
print_map(eap->eap_type, eap_type_map));
- if (eap_parse(env, sa, eap, msg->msg_response) == -1)
+ if (eap_parse(env, sa, msg, eap, msg->msg_response) == -1)
return (-1);
+ msg->msg_parent->msg_eap.eam_found = 1;
}
return (0);