File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ pub fn get_runner(
105105 let tun_name =
106106 tun_init_config. tun_name . expect ( "tun name must be provided" ) ;
107107 let tun_exist = network_interface:: NetworkInterface :: show ( )
108- . and_then ( |ifs| Ok ( ifs. into_iter ( ) . any ( |x| x. name == tun_name) ) )
108+ . map ( |ifs| ifs. into_iter ( ) . any ( |x| x. name == tun_name) )
109109 . unwrap_or_default ( ) ;
110110
111111 if tun_exist {
@@ -128,12 +128,12 @@ pub fn get_runner(
128128 ) ;
129129 }
130130
131- if let Some ( gateway_v6 ) = cfg . gateway_v6
132- && !tun_exist
133- {
134- debug ! ( "setting tun ipv6 addr: {:?}" , cfg . gateway_v6 ) ;
135- tun_builder =
136- tun_builder . ipv6 ( gateway_v6 . addr ( ) , gateway_v6 . netmask ( ) ) ;
131+ if !tun_exist {
132+ if let Some ( gateway_v6 ) = cfg . gateway_v6 {
133+ debug ! ( "setting tun ipv6 addr: {:?}" , cfg . gateway_v6 ) ;
134+ tun_builder =
135+ tun_builder. ipv6 ( gateway_v6 . addr ( ) , gateway_v6 . netmask ( ) ) ;
136+ }
137137 }
138138
139139 #[ cfg( target_os = "windows" ) ]
You can’t perform that action at this time.
0 commit comments