-/* $OpenBSD: ikev2.c,v 1.352 2022/09/19 20:54:02 tobhe Exp $ */
+/* $OpenBSD: ikev2.c,v 1.353 2022/09/21 22:32:10 tobhe Exp $ */
/*
* Copyright (c) 2019 Tobias Heider <tobias.heider@stusta.de>
initiator = 0;
/*
* See if we have responded to this request before
+ * For return values 0 and -1 we have.
*/
if ((r = ikev2_msg_retransmit_response(env, sa, msg,
- hdr->ike_exchange)) != 0) {
+ hdr->ike_exchange)) != -2) {
if (r == -1) {
log_warn("%s: failed to retransmit a "
"response", __func__);
-/* $OpenBSD: ikev2_msg.c,v 1.86 2022/09/19 20:54:02 tobhe Exp $ */
+/* $OpenBSD: ikev2_msg.c,v 1.87 2022/09/21 22:32:11 tobhe Exp $ */
/*
* Copyright (c) 2019 Tobias Heider <tobias.heider@stusta.de>
if ((mr = ikev2_msg_lookup(env, &sa->sa_responses, msg, exchange))
== NULL)
- return (0);
+ return (-2); /* not found */
TAILQ_FOREACH(m, &mr->mrt_frags, msg_entry) {
if (sendtofrom(m->msg_fd, ibuf_data(m->msg_data),