diff options
author | 2025-04-11 21:46:03 -0500 | |
---|---|---|
committer | 2025-05-20 21:59:23 +0200 | |
commit | 13d190bc72ce1753fbf0d1d6828677d1bc743807 (patch) | |
tree | 7f717a77f4abe91dcfb793d6b843602c74730169 | |
parent | ipc: linux: enforce IFNAMSIZ limit (diff) | |
download | wireguard-tools-13d190bc72ce1753fbf0d1d6828677d1bc743807.tar.xz wireguard-tools-13d190bc72ce1753fbf0d1d6828677d1bc743807.zip |
ipc: freebsd: use AF_LOCAL for the control socket
AF_INET assumes that IPv4 is built into the kernel, but it's completely
valid to build a kernel without it. unix(4) sockets, on the other hand,
are not-optional in the kernel build. Given that interface ioctls can
be invoked on any kind of socket, switch to the safer one to avoid
breaking on IPv6-only kernels.
Signed-off-by: Kyle Evans <kevans@FreeBSD.org>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r-- | src/ipc-freebsd.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ipc-freebsd.h b/src/ipc-freebsd.h index fa74edd..446f13c 100644 --- a/src/ipc-freebsd.h +++ b/src/ipc-freebsd.h @@ -15,7 +15,7 @@ static int get_dgram_socket(void) { static int sock = -1; if (sock < 0) - sock = socket(AF_INET, SOCK_DGRAM, 0); + sock = socket(AF_LOCAL, SOCK_DGRAM, 0); return sock; } |