Skip to content
This repository has been archived by the owner on Oct 27, 2024. It is now read-only.

Commit

Permalink
Bump version 3.1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
ssrlive committed Oct 3, 2024
1 parent 8b0070d commit 77fb9fb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tun2"
version = "3.1.6"
version = "3.1.7"
edition = "2021"
authors = ["meh. <[email protected]>", "@ssrlive"]
license = "WTFPL"
Expand Down
10 changes: 8 additions & 2 deletions src/platform/windows/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,10 @@ impl AbstractDevice for Device {
let addresses = tun.session.get_adapter().get_addresses()?;
addresses
.iter()
.find_map(|a| Some(*a))
.find_map(|a| match a {
std::net::IpAddr::V4(a) => Some(std::net::IpAddr::V4(*a)),
_ => None,
})
.ok_or(Error::InvalidConfig)
}
Driver::Tap(_tap) => unimplemented!(),
Expand Down Expand Up @@ -193,7 +196,10 @@ impl AbstractDevice for Device {
.get_adapter()
.get_gateways()?
.iter()
.find_map(|a| Some(*a))
.find_map(|a| match a {
std::net::IpAddr::V4(a) => Some(std::net::IpAddr::V4(*a)),
_ => None,
})
.ok_or(Error::InvalidConfig),
Driver::Tap(_tap) => unimplemented!(),
}
Expand Down

0 comments on commit 77fb9fb

Please sign in to comment.