Update socket2 to v0.4 (#1420)

This commit is contained in:
Thomas de Zeeuw 2021-03-21 20:29:31 +00:00 committed by GitHub
parent b7143ecff1
commit 97e4cf7e20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 38 additions and 26 deletions

View File

@ -107,7 +107,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
version: ['1.45.0', beta, nightly]
version: ['1.46.0', beta, nightly]
steps:
- uses: actions/checkout@v2

20
Cargo.lock generated
View File

@ -1,5 +1,7 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "addr2line"
version = "0.14.1"
@ -731,7 +733,7 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f7e2f18aece9709094573a9f24f483c4f65caa4298e2f7ae1b71cc65d853fad7"
dependencies = [
"socket2",
"socket2 0.3.19",
"widestring",
"winapi",
"winreg",
@ -871,7 +873,7 @@ version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a33c1b55807fbed163481b5ba66db4b2fa6cde694a5027be10fb724206c5897"
dependencies = [
"socket2",
"socket2 0.3.19",
"winapi",
]
@ -900,7 +902,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "670361df1bc2399ee1ff50406a0d422587dd3bb0da596e1978fe8e05dabddf4f"
dependencies = [
"libc",
"socket2",
"socket2 0.3.19",
]
[[package]]
@ -1386,6 +1388,16 @@ dependencies = [
"winapi",
]
[[package]]
name = "socket2"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e3dfc207c526015c632472a77be09cf1b6e46866581aecae5cc38fb4235dea2"
dependencies = [
"libc",
"winapi",
]
[[package]]
name = "spin"
version = "0.5.2"
@ -1780,7 +1792,7 @@ dependencies = [
"ring",
"serde",
"smallvec",
"socket2",
"socket2 0.4.0",
"thiserror",
"tinyvec",
"tokio",

View File

@ -172,7 +172,7 @@ presume that the trust-dns repos have already been synced to the local system:
### Minimum Rust Version
- The current minimum rustc version for this project is `1.45`
- The current minimum rustc version for this project is `1.46`
- OpenSSL development libraries (optional in client and resolver, min version 1.0.2)
### Mac OS X: using homebrew

View File

@ -44,7 +44,7 @@ Zones will be automatically resigned on any record updates via dynamic DNS. To e
## Minimum Rust Version
The current minimum rustc version for this project is `1.45`
The current minimum rustc version for this project is `1.46`
## Versioning

View File

@ -51,7 +51,7 @@ async fn main() {
## Minimum Rust Version
The current minimum rustc version for this project is `1.45`
The current minimum rustc version for this project is `1.46`
## Versioning

View File

@ -74,7 +74,7 @@ Zones will be automatically resigned on any record updates via dynamic DNS. To e
## Minimum Rust Version
The current minimum rustc version for this project is `1.45`
The current minimum rustc version for this project is `1.46`
## Versioning

View File

@ -6,7 +6,7 @@ This library allows for HTTPS connections to be established to remote DNS server
## Minimum Rust Version
The current minimum rustc version for this project is `1.45`
The current minimum rustc version for this project is `1.46`
## Versioning

View File

@ -6,7 +6,7 @@ This library allows for TLS connections to be established to remote DNS servers.
## Minimum Rust Version
The current minimum rustc version for this project is `1.45`
The current minimum rustc version for this project is `1.46`
## Versioning

View File

@ -6,7 +6,7 @@ This library allows for TLS connections to be established to remote DNS servers.
## Minimum Rust Version
The current minimum rustc version for this project is `1.45`
The current minimum rustc version for this project is `1.46`
## Versioning

View File

@ -46,7 +46,7 @@ default = ["tokio-runtime"]
serde-config = ["serde"]
# enables experimental the mDNS (multicast) feature
mdns = ["socket2/reuseport"]
mdns = ["socket2/all"]
# WARNING: there is a bug in the mutual tls auth code at the moment see issue #100
# mtls = ["tls"]
@ -76,7 +76,7 @@ rand = "0.8"
ring = { version = "0.16", optional = true, features = ["std"] }
serde = { version = "1.0", features = ["derive"], optional = true }
smallvec = "1.6"
socket2 = { version = "0.3.16", optional = true }
socket2 = { version = "0.4.0", optional = true }
thiserror = "1.0.20"
tinyvec = { version = "1.1.1", features = ["alloc"] }
tokio = { version = "1.0", optional = true }

View File

@ -4,7 +4,7 @@ Trust-DNS Proto is the foundational DNS protocol library and implementation for
## Minimum Rust Version
The current minimum rustc version for this project is `1.45`
The current minimum rustc version for this project is `1.46`
## Versioning

View File

@ -205,18 +205,18 @@ impl MdnsStream {
let socket = match ip_addr {
IpAddr::V4(ref mdns_v4) => {
let socket = Socket::new(
socket2::Domain::ipv4(),
socket2::Type::dgram(),
Some(socket2::Protocol::udp()),
socket2::Domain::IPV4,
socket2::Type::DGRAM,
Some(socket2::Protocol::UDP),
)?;
socket.join_multicast_v4(mdns_v4, &Ipv4Addr::new(0, 0, 0, 0))?;
socket
}
IpAddr::V6(ref mdns_v6) => {
let socket = Socket::new(
socket2::Domain::ipv6(),
socket2::Type::dgram(),
Some(socket2::Protocol::udp()),
socket2::Domain::IPV6,
socket2::Type::DGRAM,
Some(socket2::Protocol::UDP),
)?;
socket.set_only_v6(true)?;
@ -232,7 +232,7 @@ impl MdnsStream {
Self::bind_multicast(&socket, multicast_addr)?;
debug!("joined {}", multicast_addr);
Ok(Some(socket.into_udp_socket()))
Ok(Some(std::net::UdpSocket::from(socket)))
}
/// Creates a future for randomly binding to a local socket address for client connections.
@ -350,7 +350,7 @@ impl NextRandomUdpSocket {
}
}
Ok(socket.into_udp_socket())
Ok(std::net::UdpSocket::from(socket))
}
}

View File

@ -98,7 +98,7 @@ Success for query name: www.example.com. type: A class: IN
## Minimum Rust Version
The current minimum rustc version for this project is `1.45`
The current minimum rustc version for this project is `1.46`
## Versioning

View File

@ -6,7 +6,7 @@ This library allows for TLS connections to be established to remote DNS servers.
## Minimum Rust Version
The current minimum rustc version for this project is `1.45`
The current minimum rustc version for this project is `1.46`
## Versioning

View File

@ -24,7 +24,7 @@ This library contains basic implementations for DNS zone hosting. It is capable
## Minimum Rust Version
The current minimum rustc version for this project is `1.45`
The current minimum rustc version for this project is `1.46`
## Versioning