summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJoakim Hulthe <joakim@hulthe.net>2025-05-06 14:02:53 +0200
committerJoakim Hulthe <joakim.hulthe@mullvad.net>2025-05-14 18:00:30 +0200
commitd3224d3d9269f60e718bd53ebe62f5257ded1cd0 (patch)
treeb4f660d01be17363350722770d5d716204604ffa
parent3c046f8ccda41a95f4495e7147c7c09842b7c5bd (diff)
downloadmullvadvpn-d3224d3d9269f60e718bd53ebe62f5257ded1cd0.tar.xz
mullvadvpn-d3224d3d9269f60e718bd53ebe62f5257ded1cd0.zip
Add some comments to talpid-wireguard
-rw-r--r--talpid-wireguard/src/lib.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/talpid-wireguard/src/lib.rs b/talpid-wireguard/src/lib.rs
index 6144e78a0d..308d8c335b 100644
--- a/talpid-wireguard/src/lib.rs
+++ b/talpid-wireguard/src/lib.rs
@@ -882,15 +882,20 @@ impl WireguardMonitor {
iface_name: &str,
config: &'a Config,
) -> impl Iterator<Item = RequiredRoute> + 'a {
+ // e.g. utun4
let gateway_node = talpid_routing::Node::device(iface_name.to_string());
+
+ // e.g. route to 10.64.0.1 through utun4
let gateway_routes = std::iter::once(RequiredRoute::new(
ipnetwork::Ipv4Network::from(config.ipv4_gateway).into(),
gateway_node.clone(),
))
+ // same but ipv6
.chain(config.ipv6_gateway.map(|gateway| {
RequiredRoute::new(ipnetwork::Ipv6Network::from(gateway).into(), gateway_node)
}));
+ // e.g. utun4 and utun4
let (node_v4, node_v6) = Self::get_tunnel_nodes(iface_name, config);
#[cfg(any(target_os = "linux", target_os = "macos"))]