![]() So the last change broke consuming responses, as it may return an invalid remote pointer. Thanks for the catch zx2c4. We just pass a flag "lookup_keypair" which will lookup the keypair when we want (for cookie) and will not when we don't (for consuming responses). It would be possible to merge both noise_remote_index_lookup and noise_keypair_lookup, but the result would probably need to return a void * (for both keypair and remote) or a noise_index * which would need to be cast to the relevant type somewhere. The trickiest thing here would be for if_wg to "put" the result of the function, as it may be a remote or a keypair (which store their refcount in different locations). Perhaps it would return a noise_index * which could contain the refcount for both keypair and remote. It all seems easier to leave them separate. The only argument for combining them would be to reduce duplication of (similar) functions. Signed-off-by: Matt Dunwoodie <ncon@noconroy.net> |
||
---|---|---|
src | ||
tests | ||
COPYING | ||
MISSING.md | ||
README.md | ||
TODO.md |
README.md
WireGuard for FreeBSD
This is a kernel module for FreeBSD to support WireGuard. It is being developed here before its eventual submission to FreeBSD 13.1 or 14.
Installation instructions
First make sure you have the latest net/wireguard package installed, version ≥1.0.20210315.
Then, on FreeBSD 12 & 13:
# git clone https://git.zx2c4.com/wireguard-freebsd
# make -C wireguard-freebsd/src
# make -C wireguard-freebsd/src load install
After that, it should be possible to use wg(8)
and wg-quick(8)
like usual, but with the faster kernel implementation.