innernet/wireguard-control
Ryan Gonzalez f67457e0a4 Use the proper netlink buffer size with large kernel pages
The recommended netlink buffer size is based on the system's page size,
which means that the current size is far too small for systems with 16k
or 64k pages, such as Asahi Linux or RHEL's kernel-64k for ARM64. On
these systems, the server fails to start with errors like this:

Error: Decode error occurred: invalid netlink buffer: length field says 1444 the buffer is 1260 bytes long

Instead, follow the kernel's own netlink docs to compute the buffer
size. The approach here matches the approach merged into Chromium
recently:

https://chromium-review.googlesource.com/c/chromium/src/+/4312885
2023-05-30 09:24:07 +02:00
..
examples Auto-apply clippy lint fixes from Rust 1.67 2023-02-05 03:13:54 +09:00
src Use the proper netlink buffer size with large kernel pages 2023-05-30 09:24:07 +02:00
.gitignore meta: rename wgctrl to wireguard-control 2021-09-15 12:43:20 +09:00
Cargo.toml Fix rand_core dependency, cargo update 2023-01-13 14:31:45 +09:00
README.md meta: rename wgctrl to wireguard-control 2021-09-15 12:43:20 +09:00

README.md

wireguard-control

A high-level control library to get and set configurations for WireGuard interfaces.

It's a heavily-modified fork of K900's wgctrl-rs, and was made for innernet.

Currently supports:

  • Linux kernel WireGuard implementation
  • Userspace WireGuard implementations (tested against wireguard-go on macOS and Linux)

Versioning is held in lockstep with innernet, although this may change in the future.