diff options
Diffstat (limited to 'sysdep/unix/wg_user.c')
-rw-r--r-- | sysdep/unix/wg_user.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/sysdep/unix/wg_user.c b/sysdep/unix/wg_user.c index 6920d9ef..e7144d20 100644 --- a/sysdep/unix/wg_user.c +++ b/sysdep/unix/wg_user.c @@ -254,13 +254,7 @@ wg_user_set_device(struct pool *pool, sock->rx_hook = user_rx_hook; sock->tx_hook = user_tx_hook; sock->err_hook = user_err_hook; - int res = sk_connect_unix(sock, path, pathlen); - DBG(L_TRACE "WG: socket %d %d %s", res, sock->fd, path); - if (res < 0) - { - rfree(sock); - return -1; - } + sock->fast_rx = 1; uint tbsize = 8192; sk_set_tbsize(sock, tbsize); @@ -276,8 +270,17 @@ wg_user_set_device(struct pool *pool, rfree(sock); return -1; } + sock->data = (void*)(uintptr_t)size; + int res = sk_connect_unix(sock, path, pathlen); + DBG(L_TRACE "WG: socket %d %d %s", res, sock->fd, path); + if (res < 0) + { + rfree(sock); + return -1; + } + /* abort(); */ return -1; } |