mirror of
https://github.com/opnsense/src.git
synced 2026-02-18 18:20:26 -05:00
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)
This commit is contained in:
parent
25512b1fca
commit
73f88915a1
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue