mirror of
https://github.com/amnezia-vpn/amneziawg-tools.git
synced 2026-10-13 21:34:42 +00:00
[GH-ISSUE #68] ipc-freebsd.h does not compile since 3.0: still written against the old containers.h #29
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
amnezia-vpn/amneziawg-tools#29
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @MarceloMayo74 on GitHub (Aug 17, 2026).
Original GitHub issue: https://github.com/amnezia-vpn/amneziawg-tools/issues/68
src/ipc-freebsd.hdoes not compile from 3.0 onwards: it is still written against the pre-3.xcontainers.h, so amneziawg-tools cannot be built for FreeBSD at all without disabling the kernel IPC path.Reproduce
On FreeBSD 16.0-CURRENT amd64, from the tarball of tag
v3.1.20260812:What happens
Cause
ipc-freebsd.hreads and writes H1–H4 as strings —dev->init_packet_magic_headerand friends — and usesMAX_AWG_STRING_LENto bound them. In 3.xcontainers.hthose are ranges:and
MAX_AWG_STRING_LENis gone. The file is byte for byte identical inv3.0.20260805andv3.1.20260812(sha2567ee38c20…), and both carry 21 references to identifiers that no longer exist, so this has been broken since the 3.0 line opened. The Linux and Windows paths were updated; this one was not, which is easy to miss because the release workflow builds Alpine, Ubuntu and Windows only.Suggested fix
Port
ipc-freebsd.hto the currentcontainers.h: send H1–H4 through the nvlist as the range type the rest of the tree now uses, and drop the string bounds check. The 3.x device keys —header_protection_key,content_padding_addition, the timings,random_trailers,disable_cookies— would need adding there too if the FreeBSD kernel module is meant to reach parity.Workaround, for anyone who lands here
Building with
-DAWG_NO_KERNEL_IPCand this one-line change toipc.cleaves the file out and produces a working
awgthat speaks only the userspace UAPI. That is enough when the peer isamneziawg-go, which is the only option on FreeBSD-based systems that cannot loadif_amn— pfSense, for instance. It is obviously not a fix for anyone using the kernel module.