lets try just one thing per thing

This commit is contained in:
Evan
2026-03-17 14:15:14 +00:00
parent 6329896909
commit 2c7ec92bce
2 changed files with 8 additions and 3 deletions
+4 -1
View File
@@ -145,6 +145,9 @@ pub mod if_watcher {
for interface in ["lo", "lo0"] {
if let Some(iface) = initial.get(interface) {
add_ip(my_range.addr(), iface).await?;
let Ok(()) = send.send(Babble::AddIface(iface.name().to_string())).await else {
return Ok(());
};
break;
}
}
@@ -175,7 +178,7 @@ pub mod if_watcher {
iface_num += 1;
assert!(iface_num < u16::MAX, "Really? u16::MAX interfaces?");
tracing::info!("adding new ip {addr} to {}", iface.name());
//add_ip(addr, iface).await?;
add_ip(addr, iface).await?;
}
tracing::info!("telling babeld to watch {}", iface.name());
+4 -2
View File
@@ -52,9 +52,11 @@ async fn main() -> color_eyre::Result<()> {
// make our directory world readable
if let Err(e) = std::fs::set_permissions(PUBLIC_DIR, Permissions::from_mode(0o0755)) {
if e.kind() == io::ErrorKind::PermissionDenied {
return eyre!("Insufficient permissions to run daemon -- did you forget sudo?");
return Err(eyre!(
"Insufficient permissions to run daemon -- did you forget sudo?"
));
}
return Err(e);
return Err(e.into());
}
let res = inner_main().await;