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
103896dd88
Fix rand_core dependency, cargo update
...
Should fix #242 .
We depend on `getrandom` feature of `rand_core`, but we weren't specifying that.
It worked because `curve25519-dalek 4.0.0-pre.2` was pulling the `getrandom` feature of `rand_core`, but after updating it to `4.0.0-pre.5` it stopped pulling `rand_core` altogether.
After the cargo-update, all out dependencies are on their newest version, sans clap 3.2, which could be updated to 4.0. It has quite some breaking API changes, so I'll leave that for a separate PR.
2023-01-13 14:31:45 +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
eac6071d7a
meta: release v1.5.5
2022-09-23 23:16:35 -05: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
Jake McGinty
55671ec80a
meta: cargo update
2022-08-10 15:58:46 -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
a6c918a581
meta: release v1.5.4
2022-03-16 18:17:37 +09:00
Jake McGinty
be8786a11c
meta: release v1.5.4-beta.5
2022-03-15 11:15:56 +09:00
Jake McGinty
e544391303
meta: update dependencies
2022-03-15 10:47:52 +09:00
Jake McGinty
3bfd81d8ed
meta: release v1.5.4-beta.4
2022-02-18 10:57:22 +09:00
Jake McGinty
65e556b517
wireguard-control: use latest curve25519-dalek
2022-02-18 10:56:53 +09:00
Jake McGinty
ed4c6ea495
wireguard-control: use netlink-packet-wireguard 0.2
2022-02-15 02:34:21 +09:00
Jake McGinty
c4c34d5c10
wireguard-control: {generate => get}_public()
2022-02-04 17:56:18 -06:00
Jake McGinty
80a070baae
meta: release v1.5.4-beta.3
2022-02-05 04:18:39 +09:00
Jake McGinty
c7a2f7391c
meta: release v1.5.4-beta.2
2022-02-03 01:50:39 +09:00
Jake McGinty
f7df6bab01
meta: release v1.5.4-beta.1
2022-02-01 14:04:11 +09:00
Jake McGinty
2cb530762c
wireguard-control: go back to using upstream netlink
2022-02-01 05:40:49 +09:00
Jake McGinty
4715cd0c87
meta: release v1.5.3
2022-02-01 04:56:11 +09:00
Jake McGinty
4000d84648
meta: release v1.5.3-beta.5
2022-01-22 18:08:31 +00:00
Jake McGinty
7d5ad8e078
wireguard-control: style tweak
2022-01-18 12:40:01 -06:00
Jake McGinty
16ac280807
meta: release v1.5.3-beta.4
2022-01-18 15:56:36 +09:00
Jake McGinty
9829b4b3e9
wireguard-control: correctness fix in ApplyPayload
...
fixes #188
2022-01-18 15:55:19 +09:00
Jake McGinty
b53376b9c8
meta: release v1.5.3-beta.3
2022-01-18 15:19:53 +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
ce23bbdf63
meta: release v1.5.3-beta.2
2022-01-12 16:31:31 -06: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
6541605319
wireguard-control: add log crate dependency to allow debug output
2022-01-12 16:15:05 -06:00
Jake McGinty
b15b541669
meta: release v1.5.3-beta.1
2022-01-11 14:18:19 -06:00
Jake McGinty
5c72592069
meta: rust edition 2018 -> 2021
2022-01-11 01:54:43 -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
6be3e61074
meta: release v1.5.2
2021-12-06 02:35:18 +09:00
Jake McGinty
55c3a18d00
wireguard-control(-sys): add FFI upgrade script and run it
2021-11-21 15:46:09 +09:00
Jake McGinty
9a59ac3094
meta: release v1.5.1
2021-11-11 18:42:21 +09:00
Jake McGinty
1b983d636d
meta: release v1.5.0
2021-09-17 14:18:09 +09:00
Jake McGinty
9b1315b079
meta: release v1.5.0-beta.5
2021-09-16 02:00:03 +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
dff3b4d4ee
wireguard-control: update wireguard-control-sys version
2021-09-15 21:35:21 +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