diff options
author | Mikael Magnusson <mikma@users.sourceforge.net> | 2020-05-13 21:19:13 +0200 |
---|---|---|
committer | Mikael Magnusson <mikma@users.sourceforge.net> | 2020-05-13 21:19:13 +0200 |
commit | 1ba46f4d04302cc109025938fe36625f220f13eb (patch) | |
tree | 570493d08f521581fa3d364fc351a72112009fc4 | |
parent | 122fa3ed0b6f6f1ee310be896bd1506c4c014cdb (diff) |
WIP print errno
-rw-r--r-- | sysdep/unix/wg_user.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sysdep/unix/wg_user.c b/sysdep/unix/wg_user.c index 4db04067..c4bec9ce 100644 --- a/sysdep/unix/wg_user.c +++ b/sysdep/unix/wg_user.c @@ -3,6 +3,7 @@ #include <sys/stat.h> #include <sys/un.h> #include <unistd.h> +#include <errno.h> #include "lib/lists.h" #include "lib/ip.h" #include "lib/socket.h" @@ -240,7 +241,7 @@ wg_user_set_device(struct pool *pool, sock->tx_hook = user_tx_hook; sock->err_hook = user_err_hook; int res = sk_connect_unix(sock, path, pathlen); - log(L_TRACE "WG: socket %d %d %d %s %d", res, sock->fd, path[0], path + 1, pathlen); + log(L_TRACE "WG: socket %s %d %d %d %s %d", strerror(errno), res, errno, sock->fd, path[0], path + 1, pathlen); DBG(L_TRACE "WG: socket %d %d %s", res, sock->fd, path); if (res < 0) { |