wg: propagate set errno

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2016-07-21 13:33:20 +02:00
parent a773a23c75
commit a8baff2ab3
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}