diff options
author | Tobias Heider <tobhe@cvs.openbsd.org> | 2021-11-27 21:50:06 +0000 |
---|---|---|
committer | Tobias Heider <tobhe@cvs.openbsd.org> | 2021-11-27 21:50:06 +0000 |
commit | f3dd86b99fc1056048e99f60a4a51ae0ce8dec39 (patch) | |
tree | f80a860a5216f5f61efaa6e4728130a390aa044d /sbin | |
parent | c240570a7d310f4303f4ddb8b2e9f748ff2cf618 (diff) |
Rename msg_id to msg_peerid now that we also have msg_localid.
ok patrick@
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/iked/iked.h | 4 | ||||
-rw-r--r-- | sbin/iked/ikev2.c | 22 | ||||
-rw-r--r-- | sbin/iked/ikev2_msg.c | 6 | ||||
-rw-r--r-- | sbin/iked/ikev2_pld.c | 4 | ||||
-rw-r--r-- | sbin/iked/policy.c | 8 |
5 files changed, 22 insertions, 22 deletions
diff --git a/sbin/iked/iked.h b/sbin/iked/iked.h index 3067d86f94a..4ac27c1747d 100644 --- a/sbin/iked/iked.h +++ b/sbin/iked/iked.h @@ -1,4 +1,4 @@ -/* $OpenBSD: iked.h,v 1.198 2021/11/26 16:22:44 patrick Exp $ */ +/* $OpenBSD: iked.h,v 1.199 2021/11/27 21:50:05 tobhe Exp $ */ /* * Copyright (c) 2019 Tobias Heider <tobias.heider@stusta.de> @@ -597,7 +597,7 @@ struct iked_message { uint16_t msg_dhgroup; /* dh group */ struct ibuf *msg_ke; /* dh key exchange */ struct iked_id msg_auth; /* AUTH payload */ - struct iked_id msg_id; + struct iked_id msg_peerid; struct iked_id msg_localid; struct iked_id msg_cert; struct ibuf *msg_cookie; diff --git a/sbin/iked/ikev2.c b/sbin/iked/ikev2.c index 18c4f29b10d..8cbbfcaa46d 100644 --- a/sbin/iked/ikev2.c +++ b/sbin/iked/ikev2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ikev2.c,v 1.336 2021/11/26 14:05:01 tobhe Exp $ */ +/* $OpenBSD: ikev2.c,v 1.337 2021/11/27 21:50:05 tobhe Exp $ */ /* * Copyright (c) 2019 Tobias Heider <tobias.heider@stusta.de> @@ -887,7 +887,7 @@ ikev2_ike_auth_recv(struct iked *env, struct iked_sa *sa, id = &sa->sa_iid; /* try to relookup the policy based on the peerid */ - if (msg->msg_id.id_type && !sa->sa_hdr.sh_initiator) { + if (msg->msg_peerid.id_type && !sa->sa_hdr.sh_initiator) { old = sa->sa_policy; sa->sa_policy = NULL; @@ -930,9 +930,9 @@ ikev2_ike_auth_recv(struct iked *env, struct iked_sa *sa, old->pol_nflows) != 0 || msg->msg_policy != old) { /* get dstid */ - if (msg->msg_id.id_type) { - memcpy(id, &msg->msg_id, sizeof(*id)); - bzero(&msg->msg_id, sizeof(msg->msg_id)); + if (msg->msg_peerid.id_type) { + memcpy(id, &msg->msg_peerid, sizeof(*id)); + bzero(&msg->msg_peerid, sizeof(msg->msg_peerid)); } log_warnx("%s: policy mismatch", SPI_SA(sa, __func__)); ikev2_send_auth_failed(env, sa); @@ -949,18 +949,18 @@ ikev2_ike_auth_recv(struct iked *env, struct iked_sa *sa, if (!msg->msg_auth.id_type && !sa->sa_policy->pol_auth.auth_eap) { /* get dstid */ - if (msg->msg_id.id_type) { - memcpy(id, &msg->msg_id, sizeof(*id)); - bzero(&msg->msg_id, sizeof(msg->msg_id)); + if (msg->msg_peerid.id_type) { + memcpy(id, &msg->msg_peerid, sizeof(*id)); + bzero(&msg->msg_peerid, sizeof(msg->msg_peerid)); } log_debug("%s: missing auth payload", SPI_SA(sa, __func__)); ikev2_send_auth_failed(env, sa); return (-1); } - if (msg->msg_id.id_type) { - memcpy(id, &msg->msg_id, sizeof(*id)); - bzero(&msg->msg_id, sizeof(msg->msg_id)); + if (msg->msg_peerid.id_type) { + memcpy(id, &msg->msg_peerid, sizeof(*id)); + bzero(&msg->msg_peerid, sizeof(msg->msg_peerid)); if (!sa->sa_hdr.sh_initiator) { if ((authmsg = ikev2_msg_auth(env, sa, diff --git a/sbin/iked/ikev2_msg.c b/sbin/iked/ikev2_msg.c index 1b66b997c9f..d586e4f56f3 100644 --- a/sbin/iked/ikev2_msg.c +++ b/sbin/iked/ikev2_msg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ikev2_msg.c,v 1.81 2021/11/26 16:22:44 patrick Exp $ */ +/* $OpenBSD: ikev2_msg.c,v 1.82 2021/11/27 21:50:05 tobhe Exp $ */ /* * Copyright (c) 2019 Tobias Heider <tobias.heider@stusta.de> @@ -193,7 +193,7 @@ ikev2_msg_cleanup(struct iked *env, struct iked_message *msg) ibuf_release(msg->msg_nonce); ibuf_release(msg->msg_ke); ibuf_release(msg->msg_auth.id_buf); - ibuf_release(msg->msg_id.id_buf); + ibuf_release(msg->msg_peerid.id_buf); ibuf_release(msg->msg_localid.id_buf); ibuf_release(msg->msg_cert.id_buf); ibuf_release(msg->msg_cookie); @@ -207,7 +207,7 @@ ikev2_msg_cleanup(struct iked *env, struct iked_message *msg) msg->msg_nonce = NULL; msg->msg_ke = NULL; msg->msg_auth.id_buf = NULL; - msg->msg_id.id_buf = NULL; + msg->msg_peerid.id_buf = NULL; msg->msg_localid.id_buf = NULL; msg->msg_cert.id_buf = NULL; msg->msg_cookie = NULL; diff --git a/sbin/iked/ikev2_pld.c b/sbin/iked/ikev2_pld.c index 12d1d18576c..027a87a89ff 100644 --- a/sbin/iked/ikev2_pld.c +++ b/sbin/iked/ikev2_pld.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ikev2_pld.c,v 1.120 2021/11/26 16:22:44 patrick Exp $ */ +/* $OpenBSD: ikev2_pld.c,v 1.121 2021/11/27 21:50:05 tobhe Exp $ */ /* * Copyright (c) 2019 Tobias Heider <tobias.heider@stusta.de> @@ -761,7 +761,7 @@ ikev2_pld_id(struct iked *env, struct ikev2_payload *pld, if (((sa->sa_hdr.sh_initiator && payload == IKEV2_PAYLOAD_IDr) || (!sa->sa_hdr.sh_initiator && payload == IKEV2_PAYLOAD_IDi))) - idp = &msg->msg_parent->msg_id; + idp = &msg->msg_parent->msg_peerid; else if (!sa->sa_hdr.sh_initiator && payload == IKEV2_PAYLOAD_IDr) idp = &msg->msg_parent->msg_localid; else { diff --git a/sbin/iked/policy.c b/sbin/iked/policy.c index 66354e7acbf..99c24c17631 100644 --- a/sbin/iked/policy.c +++ b/sbin/iked/policy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: policy.c,v 1.87 2021/11/26 16:22:44 patrick Exp $ */ +/* $OpenBSD: policy.c,v 1.88 2021/11/27 21:50:05 tobhe Exp $ */ /* * Copyright (c) 2020-2021 Tobias Heider <tobhe@openbsd.org> @@ -103,10 +103,10 @@ policy_lookup(struct iked *env, struct iked_message *msg, pol.pol_flags |= IKED_POLICY_TRANSPORT; memcpy(&pol.pol_peer.addr, &msg->msg_peer, sizeof(msg->msg_peer)); memcpy(&pol.pol_local.addr, &msg->msg_local, sizeof(msg->msg_local)); - if (msg->msg_id.id_type && - ikev2_print_id(&msg->msg_id, idstr, IKED_ID_SIZE) == 0 && + if (msg->msg_peerid.id_type && + ikev2_print_id(&msg->msg_peerid, idstr, IKED_ID_SIZE) == 0 && (s = strchr(idstr, '/')) != NULL) { - pol.pol_peerid.id_type = msg->msg_id.id_type; + pol.pol_peerid.id_type = msg->msg_peerid.id_type; pol.pol_peerid.id_length = strlen(s+1); strlcpy(pol.pol_peerid.id_data, s+1, sizeof(pol.pol_peerid.id_data)); |