summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortobhe <tobhe@openbsd.org>2020-08-28 13:37:52 +0000
committertobhe <tobhe@openbsd.org>2020-08-28 13:37:52 +0000
commitff6390f759ff9621b57a3dacf35b1704fff4623a (patch)
treee20e3e9b51029284723cb67a710347eff36d5f12
parentMake sure not to pass NULL to explicit_bzero(). (diff)
downloadwireguard-openbsd-ff6390f759ff9621b57a3dacf35b1704fff4623a.tar.xz
wireguard-openbsd-ff6390f759ff9621b57a3dacf35b1704fff4623a.zip
Rename ikev2_*_sa() functions to make clear they handle Child SAs.
ok patrick@
-rw-r--r--sbin/iked/iked.h8
-rw-r--r--sbin/iked/ikev2.c8
-rw-r--r--sbin/iked/pfkey.c8
3 files changed, 12 insertions, 12 deletions
diff --git a/sbin/iked/iked.h b/sbin/iked/iked.h
index 7939df6f577..5f345f2791d 100644
--- a/sbin/iked/iked.h
+++ b/sbin/iked/iked.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: iked.h,v 1.163 2020/08/26 14:49:48 tobhe Exp $ */
+/* $OpenBSD: iked.h,v 1.164 2020/08/28 13:37:52 tobhe Exp $ */
/*
* Copyright (c) 2019 Tobias Heider <tobias.heider@stusta.de>
@@ -929,10 +929,10 @@ struct ikev2_payload *
ikev2_add_payload(struct ibuf *);
int ikev2_next_payload(struct ikev2_payload *, size_t,
uint8_t);
-int ikev2_acquire_sa(struct iked *, struct iked_flow *);
+int ikev2_child_sa_acquire(struct iked *, struct iked_flow *);
+int ikev2_child_sa_drop(struct iked *, struct iked_spi *);
+int ikev2_child_sa_rekey(struct iked *, struct iked_spi *);
void ikev2_disable_rekeying(struct iked *, struct iked_sa *);
-int ikev2_rekey_sa(struct iked *, struct iked_spi *);
-int ikev2_drop_sa(struct iked *, struct iked_spi *);
int ikev2_print_id(struct iked_id *, char *, size_t);
int ikev2_print_static_id(struct iked_static_id *, char *, size_t);
diff --git a/sbin/iked/ikev2.c b/sbin/iked/ikev2.c
index b3dc30f62e2..b4a3ab3c65a 100644
--- a/sbin/iked/ikev2.c
+++ b/sbin/iked/ikev2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ikev2.c,v 1.251 2020/08/27 16:26:51 tobhe Exp $ */
+/* $OpenBSD: ikev2.c,v 1.252 2020/08/28 13:37:52 tobhe Exp $ */
/*
* Copyright (c) 2019 Tobias Heider <tobias.heider@stusta.de>
@@ -6007,7 +6007,7 @@ ikev2_valid_proposal(struct iked_proposal *prop,
/* return 0 if processed, -1 if busy */
int
-ikev2_acquire_sa(struct iked *env, struct iked_flow *acquire)
+ikev2_child_sa_acquire(struct iked *env, struct iked_flow *acquire)
{
struct iked_flow *flow;
struct iked_sa *sa;
@@ -6074,7 +6074,7 @@ ikev2_disable_rekeying(struct iked *env, struct iked_sa *sa)
/* return 0 if processed, -1 if busy */
int
-ikev2_rekey_sa(struct iked *env, struct iked_spi *rekey)
+ikev2_child_sa_rekey(struct iked *env, struct iked_spi *rekey)
{
struct iked_childsa *csa, key;
struct iked_sa *sa;
@@ -6112,7 +6112,7 @@ ikev2_rekey_sa(struct iked *env, struct iked_spi *rekey)
/* return 0 if processed, -1 if busy */
int
-ikev2_drop_sa(struct iked *env, struct iked_spi *drop)
+ikev2_child_sa_drop(struct iked *env, struct iked_spi *drop)
{
struct ibuf *buf = NULL;
struct iked_childsa *csa, key;
diff --git a/sbin/iked/pfkey.c b/sbin/iked/pfkey.c
index 9ac87ebf738..38e6833208a 100644
--- a/sbin/iked/pfkey.c
+++ b/sbin/iked/pfkey.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfkey.c,v 1.69 2020/08/13 21:36:38 tobhe Exp $ */
+/* $OpenBSD: pfkey.c,v 1.70 2020/08/28 13:37:52 tobhe Exp $ */
/*
* Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org>
@@ -1921,7 +1921,7 @@ pfkey_process(struct iked *env, struct pfkey_message *pm)
print_host(sdst, NULL, 0), print_host(dmask, NULL, 0),
print_host(speer, NULL, 0));
- ret = ikev2_acquire_sa(env, &flow);
+ ret = ikev2_child_sa_acquire(env, &flow);
out:
if (errmsg)
@@ -1968,9 +1968,9 @@ out:
"rekeying" : "deletion");
if (sa_ltime->sadb_lifetime_exttype == SADB_EXT_LIFETIME_SOFT)
- ret = ikev2_rekey_sa(env, &spi);
+ ret = ikev2_child_sa_rekey(env, &spi);
else
- ret = ikev2_drop_sa(env, &spi);
+ ret = ikev2_child_sa_drop(env, &spi);
break;
}
return (ret);