diff options
| author | Emīls <emils@mullvad.net> | 2020-12-14 10:45:47 +0000 |
|---|---|---|
| committer | Emīls <emils@mullvad.net> | 2020-12-14 10:45:47 +0000 |
| commit | 9810fc6f52bd678f74afbf494c1dda851aee3843 (patch) | |
| tree | c37590ca61f9b115a2341f565a64598387a390ee | |
| parent | f8c6634d539c75191dfb3cf07097a58b7c180fb9 (diff) | |
| parent | 41fcaebaa79b05a68f309ca5b4574faf9a6d3b62 (diff) | |
| download | mullvadvpn-9810fc6f52bd678f74afbf494c1dda851aee3843.tar.xz mullvadvpn-9810fc6f52bd678f74afbf494c1dda851aee3843.zip | |
Merge branch 'linux-update-netlink-libs' into master
| -rw-r--r-- | Cargo.lock | 62 | ||||
| -rw-r--r-- | talpid-core/Cargo.toml | 8 | ||||
| -rw-r--r-- | talpid-core/src/tunnel/wireguard/wireguard_kernel/mod.rs | 6 |
3 files changed, 57 insertions, 19 deletions
diff --git a/Cargo.lock b/Cargo.lock index 0fa850e484..7b671a0e79 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -186,6 +186,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" [[package]] +name = "byteordered" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32687ee8ab498526e3ef07dfbede151650ce202dc83c53494645a24677d89b37" +dependencies = [ + "byteorder", +] + +[[package]] name = "bytes" version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1467,21 +1476,21 @@ dependencies = [ "anyhow", "byteorder", "libc", - "netlink-packet-utils", + "netlink-packet-utils 0.2.0", ] [[package]] name = "netlink-packet-route" -version = "0.4.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "835cdfdfc4cc9e4249d0a9f63af870ef9283d2f93d34977a2c29d929bdf5b868" +checksum = "2253105e60b35a3fb6cf342b56a45ee1c76ef4b1e68c59b08f813f24c3b7b469" dependencies = [ "anyhow", "bitflags 1.2.1", "byteorder", "libc", "netlink-packet-core", - "netlink-packet-utils", + "netlink-packet-utils 0.4.0", ] [[package]] @@ -1492,21 +1501,33 @@ checksum = "2ce628faa6689198d3db4f68e6165a5ba02a8e0a5fe741cca9c1b7856bab6a66" dependencies = [ "anyhow", "byteorder", - "paste", + "paste 0.1.18", + "thiserror", +] + +[[package]] +name = "netlink-packet-utils" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c2afb159d0e3ac700e85f0df25b8438b99d43ed0c0b685242fcdf1b5673e54d" +dependencies = [ + "anyhow", + "byteorder", + "paste 1.0.4", "thiserror", ] [[package]] name = "netlink-proto" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db439abcdc707c2972287b6b1ecb1fd6731549349e09e0cf2686697959e0f10a" +checksum = "31dfd4f1653ba8e1e2410b3def2313f3399d9b9f7ec3a8a6a8f2f670c3e58d71" dependencies = [ "bytes", "futures", "log 0.4.11", "netlink-packet-core", - "netlink-sys", + "netlink-sys 0.5.0", "tokio", "tokio-util 0.2.0", ] @@ -1517,6 +1538,16 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc9e9df13fd91bdd4b92bea93d5d2848c8035677c60fc3fee5dabddc02c3012e" dependencies = [ + "libc", + "log 0.4.11", +] + +[[package]] +name = "netlink-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf10c3ab67b9c09b42abb5a53ecb8ffdad160d6485b140a6f21f53ba5362042d" +dependencies = [ "futures", "libc", "log 0.4.11", @@ -1737,6 +1768,12 @@ dependencies = [ ] [[package]] +name = "paste" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5d65c4d95931acda4498f675e332fcbdc9a06705cd07086c510e9b6009cd1c1" + +[[package]] name = "paste-impl" version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2139,10 +2176,11 @@ checksum = "d4a874cf4a0b9bc283edaa65d81d62368b84b1a8e56196e4885ca4701fd49972" [[package]] name = "rtnetlink" -version = "0.4.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0912784e738e6718b288f93174a468c31e65c8812dbb8745c0a1caa3bd84b6f" +checksum = "0c942df3c7725a0500971d857a080d6dc537e257e19ccb352f80b2c726ef7007" dependencies = [ + "byteordered", "futures", "log 0.4.11", "netlink-packet-route", @@ -2549,9 +2587,9 @@ dependencies = [ "mnl", "netlink-packet-core", "netlink-packet-route", - "netlink-packet-utils", + "netlink-packet-utils 0.4.0", "netlink-proto", - "netlink-sys", + "netlink-sys 0.4.0", "nftnl", "nix 0.19.0", "notify", diff --git a/talpid-core/Cargo.toml b/talpid-core/Cargo.toml index dd1367e770..cce754cb82 100644 --- a/talpid-core/Cargo.toml +++ b/talpid-core/Cargo.toml @@ -50,11 +50,11 @@ dbus = "0.9" failure = "0.1" notify = "4.0" resolv-conf = "0.6.1" -rtnetlink = "0.4" +rtnetlink = "0.6" netlink-packet-core = "0.2" -netlink-packet-utils = "0.2" -netlink-packet-route = "0.4" -netlink-proto = "0.4" +netlink-packet-utils = "0.4" +netlink-packet-route = "0.6" +netlink-proto = "0.5" netlink-sys = "0.4" byteorder = "1" nftnl = { version = "0.6", features = ["nftnl-1-1-0"] } diff --git a/talpid-core/src/tunnel/wireguard/wireguard_kernel/mod.rs b/talpid-core/src/tunnel/wireguard/wireguard_kernel/mod.rs index 3982833ed6..803613c332 100644 --- a/talpid-core/src/tunnel/wireguard/wireguard_kernel/mod.rs +++ b/talpid-core/src/tunnel/wireguard/wireguard_kernel/mod.rs @@ -11,7 +11,7 @@ use netlink_packet_route::{ }; use netlink_packet_utils::DecodeError; use netlink_proto::{ - sys::{Protocol, SocketAddr}, + sys::{protocols::NETLINK_GENERIC, SocketAddr}, ConnectionHandle, Error as NetlinkError, }; use std::{ffi::CString, net::IpAddr}; @@ -101,7 +101,7 @@ impl Handle { pub async fn connect() -> Result<Self, Error> { let message_type = Self::get_wireguard_message_type().await?; let (conn, wireguard_connection, _messages) = - netlink_proto::new_connection(Protocol::Generic).map_err(Error::NetlinkSocketError)?; + netlink_proto::new_connection(NETLINK_GENERIC).map_err(Error::NetlinkSocketError)?; let wg_handle = WireguardConnection { message_type, connection: wireguard_connection, @@ -125,7 +125,7 @@ impl Handle { async fn get_wireguard_message_type() -> Result<u16, Error> { let (conn, mut handle, _messages) = - netlink_proto::new_connection(Protocol::Generic).map_err(Error::NetlinkSocketError)?; + netlink_proto::new_connection(NETLINK_GENERIC).map_err(Error::NetlinkSocketError)?; let (conn, abort_handle) = abortable(conn); tokio::spawn(conn); |
