scope dns operations within a cfged block
This commit is contained in:
parent
32c3725631
commit
a7d3ef9122
@ -328,9 +328,11 @@ impl<D: Driver + 'static> Inner<D> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "dns")]
|
#[cfg(feature = "dns")]
|
||||||
|
{
|
||||||
let socket = s.sockets.get_mut::<smoltcp::socket::dns::Socket>(self.dns_socket);
|
let socket = s.sockets.get_mut::<smoltcp::socket::dns::Socket>(self.dns_socket);
|
||||||
let servers: Vec<IpAddress, 3> = config.dns_servers.iter().map(|c| IpAddress::Ipv4(*c)).collect();
|
let servers: Vec<IpAddress, 3> = config.dns_servers.iter().map(|c| IpAddress::Ipv4(*c)).collect();
|
||||||
socket.update_servers(&servers[..]);
|
socket.update_servers(&servers[..]);
|
||||||
|
}
|
||||||
|
|
||||||
self.config = Some(config)
|
self.config = Some(config)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user