]> git.ipfire.org Git - thirdparty/wireguard-go.git/commit
tun: use GetsockoptString in (*NativeTun).Name on macOS
authorTobias Klauser <tklauser@distanz.ch>
Tue, 27 Oct 2020 13:39:33 +0000 (14:39 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Tue, 27 Oct 2020 15:20:09 +0000 (16:20 +0100)
commit36dc8b6994514e42fcdf00ba91774148afbefc1c
tree1b2cefda0dac8db4f27b3ec7d72454a68fd7378e
parent2057f19a61cedbb0fef88823c832b04165325ab1
tun: use GetsockoptString in (*NativeTun).Name on macOS

Direct syscalls using unix.Syscall(unix.SYS_*, ...) are discouraged on
macOS and might not be supported in future versions. Instead, use the
existing unix.GetsockoptString wrapper to get the interface name.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
tun/tun_darwin.go