On 2022-06-01 at 11:33:54 +0200, Tobias Klauser wrote:
> Use unix.ByteSliceToString in (*NativeTun).nameSloce to convert the
^- this should say
`nameSlow`
I can fix it up in a v2 patch if needed.
Use unix.ByteSliceToString in (*NativeTun).nameSloce to convert the
TUNGETIFF ioctl result []byte to a string.
Signed-off-by: Tobias Klauser
---
tun/tun_linux.go | 7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/tun/tun_linux.go b/tun/tun_linux.go
index 89b716d9c70b
On 2021-09-23 at 17:54:20 +0200, Jason A. Donenfeld wrote:
> Applied, thanks! I'm curious: is this a bug you ran into somewhere?
I've not seen this causing problems with wireguard-go specifically, but
have seen issues with leaked fds elsewhere. So by now I'm attentive of
the pattern and send fixe
On 2021-09-23 at 17:54:59 +0200, Jason A. Donenfeld wrote:
> I've applied this. Thanks for the patch. Though I do wonder: it's
> functionally the same as before, right? What instances lead to this
> being an issue? Or did this way just seem more correct?
Thanks. Functionally it's the same, yes. I
(*NativeTun).operateOnFd is only used on darwin and freebsd. Adjust the
build tags accordingly.
Signed-off-by: Tobias Klauser
---
tun/operateonfd.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tun/operateonfd.go b/tun/operateonfd.go
index aab71161f27c..bc804539169f
At these points, the socket file descriptor is not yet wrapped in an
*os.File, so it needs to be closed explicitly on error.
Signed-off-by: Tobias Klauser
---
tun/tun_darwin.go | 6 --
tun/tun_linux.go | 11 +++
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/tun
Use the RTMGRP_IPV4_ROUTE const from x/sys/unix instead of using the
corresponding RTNLGRP_IPV4_ROUTE const to create the multicast groups
mask.
Signed-off-by: Tobias Klauser
---
device/sticky_linux.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/device/sticky_linux.go b
Update the golang.org/x/sys/unix dependency and use the newly introduced
RTMGRP_* consts instead of using the corresponding RTNLGRP_* const to
create a mask.
Signed-off-by: Tobias Klauser
---
device/conn_linux.go | 2 +-
go.mod | 2 +-
go.sum | 4 ++--
tun
Update the golang.org/x/sys/unix dependency and use the newly introduced
RTMGRP_* consts instead of using the corresponding RTNLGRP_* const to
create a mask.
Signed-off-by: Tobias Klauser
---
device/conn_linux.go | 2 +-
go.mod | 2 +-
go.sum | 4 ++--
tun