Fixed skipping of interfaces that don't have IPv6 in -6 mode

This commit is contained in:
2026-05-08 19:15:35 +01:00
parent cffb6522e3
commit ecbd781321
2 changed files with 6 additions and 3 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/target

View File

@@ -95,11 +95,13 @@ impl Monitor {
/// Was the file modified since the last check? /// Was the file modified since the last check?
fn check_file_modified(&mut self, lease_file_path: &str) -> bool { fn check_file_modified(&mut self, lease_file_path: &str) -> bool {
let metadata = fs::metadata(&lease_file_path); let metadata = match fs::metadata(&lease_file_path) {
Ok(m) => m,
Err(_) => return false,
};
let current_timestamp = metadata let current_timestamp = metadata
.expect("Unsupported platform")
.modified() .modified()
.expect("Error getting modification timestamp"); .expect("Unsupported platform: cannot read file mtime");
let last_timestamp = self let last_timestamp = self
.timestamps .timestamps