diff --git a/src/ipc.c b/src/ipc.c index 2fb1246..cc70fd1 100644 --- a/src/ipc.c +++ b/src/ipc.c @@ -201,6 +201,7 @@ static int userspace_set_device(struct wgdevice *dev) ret = ret_code; out: close_and_unlink(fd); + errno = -ret; return (int)ret; }