From ba38eea74b2c3ddb2a1ba543f87abf64e88b2de7 Mon Sep 17 00:00:00 2001 From: tobhe Date: Mon, 22 Feb 2021 21:58:12 +0000 Subject: [PATCH] Don't pass 'id' as argument to make function signature match similar functions. config_setpfkey() is always called with id PROC_IKEV2. --- sbin/iked/config.c | 6 +++--- sbin/iked/iked.c | 4 ++-- sbin/iked/iked.h | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sbin/iked/config.c b/sbin/iked/config.c index 849916f3ec0..688dba4d8fd 100644 --- a/sbin/iked/config.c +++ b/sbin/iked/config.c @@ -1,4 +1,4 @@ -/* $OpenBSD: config.c,v 1.77 2021/02/13 16:14:12 tobhe Exp $ */ +/* $OpenBSD: config.c,v 1.78 2021/02/22 21:58:12 tobhe Exp $ */ /* * Copyright (c) 2019 Tobias Heider @@ -630,13 +630,13 @@ config_getsocket(struct iked *env, struct imsg *imsg, } int -config_setpfkey(struct iked *env, enum privsep_procid id) +config_setpfkey(struct iked *env) { int s; if ((s = pfkey_socket()) == -1) return (-1); - proc_compose_imsg(&env->sc_ps, id, -1, + proc_compose_imsg(&env->sc_ps, PROC_IKEV2, -1, IMSG_PFKEY_SOCKET, -1, s, NULL, 0); return (0); } diff --git a/sbin/iked/iked.c b/sbin/iked/iked.c index 5fe91b518dd..963f74cdfd0 100644 --- a/sbin/iked/iked.c +++ b/sbin/iked/iked.c @@ -1,4 +1,4 @@ -/* $OpenBSD: iked.c,v 1.54 2021/02/13 16:14:12 tobhe Exp $ */ +/* $OpenBSD: iked.c,v 1.55 2021/02/22 21:58:12 tobhe Exp $ */ /* * Copyright (c) 2019 Tobias Heider @@ -228,7 +228,7 @@ parent_configure(struct iked *env) } env->sc_pfkey = -1; - config_setpfkey(env, PROC_IKEV2); + config_setpfkey(env); /* Send private and public keys to cert after forking the children */ if (config_setkeys(env) == -1) diff --git a/sbin/iked/iked.h b/sbin/iked/iked.h index 45658af733d..cda2e156fd9 100644 --- a/sbin/iked/iked.h +++ b/sbin/iked/iked.h @@ -1,4 +1,4 @@ -/* $OpenBSD: iked.h,v 1.185 2021/02/13 16:14:12 tobhe Exp $ */ +/* $OpenBSD: iked.h,v 1.186 2021/02/22 21:58:12 tobhe Exp $ */ /* * Copyright (c) 2019 Tobias Heider @@ -833,7 +833,7 @@ int config_setsocket(struct iked *, struct sockaddr_storage *, in_port_t, enum privsep_procid); int config_getsocket(struct iked *env, struct imsg *, void (*cb)(int, short, void *)); -int config_setpfkey(struct iked *, enum privsep_procid); +int config_setpfkey(struct iked *); int config_getpfkey(struct iked *, struct imsg *); int config_setuser(struct iked *, struct iked_user *, enum privsep_procid); int config_getuser(struct iked *, struct imsg *); -- 2.20.1