Commit Graph

25 Commits (0998593d556dc2e0bf2509dba6493d7d3376bc83)

Author SHA1 Message Date
Jake McGinty 33cee129d1
Various dependency updates (#265)
* update netlink-*, toml, clap, other small dependencies
* switch back to x25519-dalek from curve25519-dalek
2023-06-01 01:25:46 -05:00
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
Matěj Laitl 0dc92de722 Auto-apply clippy lint fixes from Rust 1.67 2023-02-05 03:13:54 +09:00
Matěj Laitl 2859684864 cargo clippy --fix --all-targets (clippy 1.66)
This is exclusively (if I look correctly) redundant referencing.
2023-01-03 22:42:50 +01:00
Jake McGinty b39b77aa5a meta: appease clippy 2022-09-23 23:43:33 -04:00
Jake McGinty 1fb5874527 meta: appease clippy 2022-08-10 16:39:09 -06:00
Matěj Laitl 144c2f654e Fix clippy warnings
Especially https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string was a bit
more involved, review requested.
2022-08-01 10:57:11 +02:00
Jake McGinty c4c34d5c10 wireguard-control: {generate => get}_public() 2022-02-04 17:56:18 -06:00
Jake McGinty 2cb530762c wireguard-control: go back to using upstream netlink 2022-02-01 05:40:49 +09:00
Jake McGinty 7d5ad8e078 wireguard-control: style tweak 2022-01-18 12:40:01 -06:00
Jake McGinty 9829b4b3e9 wireguard-control: correctness fix in ApplyPayload
fixes #188
2022-01-18 15:55:19 +09:00
Jake McGinty 4a682f8adc wireguard-control: cargo fmt 2022-01-18 15:19:40 +09:00
Jake McGinty b09d12225b wireguard-control: gracefully handle multiple Peers NLAs
Fixes #187
2022-01-18 15:12:22 +09:00
Jake McGinty 44aceb109c wireguard-control: cargo fmt 2022-01-12 16:26:11 -06:00
Jake McGinty dc40e20fcf wireguard-control: support multipart wireguard responses
previously, any messages beyond the first were ignored, so
innernet wouldn't be aware of all peers on the interface.

fixes #187
2022-01-12 16:22:02 -06:00
Jake McGinty e04bd26743 wireguard-control: correct the target genl payload length 2022-01-11 01:04:14 -06:00
Jake McGinty a21928c30c wireguard-control: add more checks on peer/NLA sizes 2022-01-10 20:29:41 -06:00
Jake McGinty a95fa1b03e wireguard-control: make cargo clippy happy 2022-01-09 23:12:28 -06:00
Jake McGinty a122077473 wireguard-control: fix iface attr not being in first message 2022-01-09 23:11:20 -06:00
Jake McGinty 68d3b09f3a wireguard-control: cargo fmt 2022-01-09 22:58:21 -06:00
Jake McGinty 92b60f535d wireguard-control: break up large updates into multiple netlink messages 2022-01-09 22:56:39 -06:00
Jake McGinty 09e68c2c01
(linux) wireguard-control: migrate from `wireguard-control-sys` to `netlink` crates (#177)
also introduces a new `netlink-request` crate to help modularize the netlink code. this currently depends on a fork of the `netlink` project, but we should be able to use the official version soon.
2022-01-07 18:35:21 +09:00
Jake McGinty 55c3a18d00 wireguard-control(-sys): add FFI upgrade script and run it 2021-11-21 15:46:09 +09:00
Matěj Laitl 72353ed7a9
Clippy all targets (#153)
* Fix clippy lints in tests

* CI: let clippy lint also tests

They deserve equal clippy love, right? :)
2021-09-15 23:47:24 +09:00
Jake McGinty 4fa689d400 meta: rename wgctrl to wireguard-control
in preparation for publishing on crates.io
2021-09-15 12:43:20 +09:00