From 7a49e61e5f5c371ca7faaa08cb1e5c6aa3f4e285 Mon Sep 17 00:00:00 2001 From: SajjadPourali Date: Wed, 24 Apr 2024 13:37:51 -0400 Subject: [PATCH] Rename tun_config variable --- examples/tun2.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/tun2.rs b/examples/tun2.rs index 90d804a..cd9af17 100644 --- a/examples/tun2.rs +++ b/examples/tun2.rs @@ -81,10 +81,10 @@ async fn main() -> Result<(), Box> { #[cfg(not(target_os = "windows"))] let gateway = Ipv4Addr::new(10, 0, 0, 1); - let mut config = tun2::Configuration::default(); - config.address(ipv4).netmask(netmask).mtu(MTU).up(); + let mut tun_config = tun2::Configuration::default(); + tun_config.address(ipv4).netmask(netmask).mtu(MTU).up(); #[cfg(not(target_os = "windows"))] - config.destination(gateway); // avoid routing all traffic to tun on Windows platform + tun_config.destination(gateway); // avoid routing all traffic to tun on Windows platform #[cfg(target_os = "linux")] tun_config.platform_config(|p_cfg| {