git: wg: Improve wg_peer_create() to propagate errors
Aaron LI
aly at crater.dragonflybsd.org
Thu Apr 17 23:20:39 PDT 2025
commit e09f6328d4975780c62e36dcfe15c9bad105091d
Author: Aaron LI <aly at aaronly.me>
Date: Fri Apr 18 14:16:36 2025 +0800
wg: Improve wg_peer_create() to propagate errors
Add the 'int *errp' parameter to wg_peer_create() to propagate the error
from noise_remote_enable() to wg_ioctl_set().
Originally, wg_ioctl_set() returned ENOMEM if wg_peer_create() failed,
but it should actually be ENOSPC because it could only fail because of
noise_remote_enable() that only returns ENOSPC.
See also: https://reviews.freebsd.org/D49796
Summary of changes:
sys/net/wg/if_wg.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/e09f6328d4975780c62e36dcfe15c9bad105091d
--
DragonFly BSD source repository
More information about the Commits
mailing list