From 32d19f66ed71d43a74c499dda0ec4f97733e2624 Mon Sep 17 00:00:00 2001 From: Himbeer Date: Fri, 9 Aug 2024 14:27:06 +0200 Subject: Fix 'file exists' on tunnel re-initialisation --- src/main.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.rs b/src/main.rs index 93c5ba9..dcef3fb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -80,6 +80,7 @@ fn logic(tnl: &mut Option, last: &mut Option<(Ipv6Addr, Ipv6Addr)>) -> Re return Ok(()); } + *tnl = None; // Delete tunnel first, otherwise creation fails with "file exists". *tnl = Some(IpIp6::new( "dslite0".to_string(), "ppp0".to_string(), -- cgit v1.2.3