sync code with last fixes and improvements from OpenBSD

This commit is contained in:
purplerain 2023-08-08 00:42:18 +00:00
parent 691f97cc10
commit 371ae113c6
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
175 changed files with 2932 additions and 1512 deletions

View file

@ -1,4 +1,4 @@
/* $OpenBSD: ikev2_pld.c,v 1.131 2023/06/28 14:10:24 tobhe Exp $ */
/* $OpenBSD: ikev2_pld.c,v 1.132 2023/08/04 19:06:25 claudio Exp $ */
/*
* Copyright (c) 2019 Tobias Heider <tobias.heider@stusta.de>
@ -685,7 +685,7 @@ ikev2_pld_ke(struct iked *env, struct ikev2_payload *pld,
print_hex(buf, 0, len);
if (ikev2_msg_frompeer(msg)) {
if (ibuf_length(msg->msg_parent->msg_ke)) {
if (msg->msg_parent->msg_ke != NULL) {
log_info("%s: duplicate KE payload", __func__);
return (-1);
}
@ -1008,7 +1008,7 @@ ikev2_pld_nonce(struct iked *env, struct ikev2_payload *pld,
print_hex(buf, 0, len);
if (ikev2_msg_frompeer(msg)) {
if (ibuf_length(msg->msg_parent->msg_nonce)) {
if (msg->msg_parent->msg_nonce != NULL) {
log_info("%s: duplicate NONCE payload", __func__);
return (-1);
}
@ -1665,7 +1665,7 @@ ikev2_pld_ef(struct iked *env, struct ikev2_payload *pld,
__func__, frag_num, frag_total);
goto done;
}
elen = ibuf_length(e);
elen = ibuf_size(e);
/* Check new fragmented message */
if (sa_frag->frag_arr == NULL) {