aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
index 0754003..a6901c7 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -251,6 +251,13 @@ impl RouteDef {
Ok(())
}
+
+ fn link(&self) -> &str {
+ match self {
+ Self::V4(r) => &r.link,
+ Self::V6(r) => &r.link,
+ }
+ }
}
impl fmt::Display for RouteDef {
@@ -842,6 +849,10 @@ fn run() -> Result<(), Error> {
Err(e) => println!("[warn] del {}: {}", route, e),
}
+ println!("[info] wait for link {}", route.def.link());
+ conn.link_wait_exists(route.def.link().to_string())
+ .map_err(SetupError::from)?;
+
if !route.delete {
match route.def.clone().add(&conn) {
Ok(_) => println!("[info] add {}", route),