[edge] Share fixes: per-network password limit and no eviction, revocation epoch never goes down, stray share tokens stripped on every host, admin socket bound in a private directory

This commit is contained in:
2026-11-07 18:44:55 +01:00
parent fee35830d1
commit 98dad246d3
6 changed files with 151 additions and 33 deletions
+12 -3
View File
@@ -32,7 +32,10 @@ fn junk_ids_from_the_same_network_cannot_flush_a_link_counter() {
for n in 0u32..10_000 {
t.failed(junk(n), Some(ip));
}
assert!(!t.allowed(victim, Some(ip)), "10,000 junk failures reset the victim's counter");
assert!(
!t.allowed(victim, Some(ip)),
"10,000 junk failures reset the victim's counter"
);
}
#[test]
@@ -66,7 +69,13 @@ fn a_full_table_refuses_new_visitors_instead_of_forgetting_old_ones() {
let other = IpAddr::from([10, (n >> 16) as u8, (n >> 8) as u8, n as u8]);
t.failed(junk(n), Some(other));
}
assert!(!t.allowed(victim, Some(ip)), "the victim's counter survived");
assert!(
!t.allowed(victim, Some(ip)),
"the victim's counter survived"
);
let newcomer = IpAddr::from([203, 0, 113, 5]);
assert!(!t.allowed(ShareId([3; 16]), Some(newcomer)), "full table: refuse, don't forget");
assert!(
!t.allowed(ShareId([3; 16]), Some(newcomer)),
"full table: refuse, don't forget"
);
}