aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHimbeer <himbeer@disroot.org>2024-08-09 14:27:06 +0200
committerHimbeer <himbeer@disroot.org>2024-08-09 14:27:06 +0200
commit32d19f66ed71d43a74c499dda0ec4f97733e2624 (patch)
tree426d837bcece324fc951f0313f84fcd14bf5c21f
parentc12933227132b21d2bd08b36ac1b33faf9292c7b (diff)
Fix 'file exists' on tunnel re-initialisation
-rw-r--r--src/main.rs1
1 files changed, 1 insertions, 0 deletions
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<IpIp6>, 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(),