Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/wgapi_windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ impl WireguardInterfaceApi for WGApi<Kernel> {
allowed_ips: peer
.allowed_ips
.iter()
.filter_map(|ip| match ip.ip {
.filter_map(|ip| match ip.address {
IpAddr::V4(addr) => Some(IpNet::V4(Ipv4Net::new(addr, ip.cidr).ok()?)),
IpAddr::V6(addr) => Some(IpNet::V6(Ipv6Net::new(addr, ip.cidr).ok()?)),
})
Expand All @@ -248,7 +248,7 @@ impl WireguardInterfaceApi for WGApi<Kernel> {
// Configure the interface
debug!("Applying configuration for adapter {}", self.ifname);
let interface = wireguard_nt::SetInterface {
listen_port: Some(config.port as u16),
listen_port: Some(config.port),
public_key: None, // derived from private key
private_key: Some(Key::from_str(&config.prvkey)?.as_array()),
peers,
Expand All @@ -263,7 +263,7 @@ impl WireguardInterfaceApi for WGApi<Kernel> {
let addresses: Vec<_> = config
.addresses
.iter()
.filter_map(|ip| match ip.ip {
.filter_map(|ip| match ip.address {
IpAddr::V4(addr) => Some(IpNet::V4(Ipv4Net::new(addr, ip.cidr).ok()?)),
IpAddr::V6(addr) => Some(IpNet::V6(Ipv6Net::new(addr, ip.cidr).ok()?)),
})
Expand Down
Loading