summaryrefslogtreecommitdiff
path: root/sbin/iked/ikev2_pld.c
diff options
context:
space:
mode:
authorYASUOKA Masahiko <yasuoka@cvs.openbsd.org>2024-07-13 12:22:47 +0000
committerYASUOKA Masahiko <yasuoka@cvs.openbsd.org>2024-07-13 12:22:47 +0000
commitbc7304d910477e4c473ae4a6c5dc2ef2db807c6d (patch)
treeb6bec27aabe2f7281fcd1dde16928a8e8699503c /sbin/iked/ikev2_pld.c
parent26645bfb61e3f02e4cdc5642dfaa16bfd1c86a7b (diff)
Add RADIUS support. Authentication, accounting, and "Dynamic
Authorization Extensions"(DAE) are supported. feedback markus stu ok tobhe
Diffstat (limited to 'sbin/iked/ikev2_pld.c')
-rw-r--r--sbin/iked/ikev2_pld.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sbin/iked/ikev2_pld.c b/sbin/iked/ikev2_pld.c
index 27605039aa9..ac8635e79fc 100644
--- a/sbin/iked/ikev2_pld.c
+++ b/sbin/iked/ikev2_pld.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ikev2_pld.c,v 1.135 2024/04/02 19:58:28 tobhe Exp $ */
+/* $OpenBSD: ikev2_pld.c,v 1.136 2024/07/13 12:22:46 yasuoka Exp $ */
/*
* Copyright (c) 2019 Tobias Heider <tobias.heider@stusta.de>
@@ -2104,6 +2104,15 @@ ikev2_pld_eap(struct iked *env, struct ikev2_payload *pld,
if (eap_parse(env, sa, msg, eap, msg->msg_response) == -1)
return (-1);
+ if (msg->msg_parent->msg_eapmsg != NULL) {
+ log_info("%s: duplicate EAP in payload", __func__);
+ return (-1);
+ }
+ if ((msg->msg_parent->msg_eapmsg = ibuf_new(eap, eap_len))
+ == NULL) {
+ log_debug("%s: failed to save eap", __func__);
+ return (-1);
+ }
msg->msg_parent->msg_eap.eam_found = 1;
}