git: 73f88915a119 - stable/14 - wireguard-tools: ipc: freebsd: use AF_LOCAL for the control socket
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 26 Apr 2025 03:21:20 UTC
The branch stable/14 has been updated by kevans:
URL: https://cgit.FreeBSD.org/src/commit/?id=73f88915a119eb9c323caf1537b3291129858930
commit 73f88915a119eb9c323caf1537b3291129858930
Author: Kyle Evans <kevans@FreeBSD.org>
AuthorDate: 2025-04-21 03:08:17 +0000
Commit: Kyle Evans <kevans@FreeBSD.org>
CommitDate: 2025-04-26 03:19:49 +0000
wireguard-tools: 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.
Reported and tested by: ivy
(cherry picked from commit 0d238bc50d453d7ac29476fa71edd1fc9a5fbbf9)
---
contrib/wireguard-tools/ipc-freebsd.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/wireguard-tools/ipc-freebsd.h b/contrib/wireguard-tools/ipc-freebsd.h
index fa74edda5a3d..446f13cacac2 100644
--- a/contrib/wireguard-tools/ipc-freebsd.h
+++ b/contrib/wireguard-tools/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;
}