better openwrt sub lan control
This commit is contained in:
1 parent
07d5bffef2
commit
e3866d75a9
15 files changed
+384
-573
No files matched your search
@@ -2,6 +2,10 @@ use crate::config::Device;
|
||||
|
||||
pub const ROOT_DOMAIN: &str = "internal";
|
||||
|
||||
// IPv6 ULA prefix assigned to br-lan (network.lan.ip6prefix). All subnets share
|
||||
// this single /64, so IPv6 internet-only blocking is done per-device MAC.
|
||||
pub const ULA_PREFIX: &str = "fd59:de0a:bff5::/48";
|
||||
|
||||
pub static IP_PREFIXES: &[(&str, &str)] = &[
|
||||
("lab", "10.0.10."),
|
||||
("k3s", "10.0.11."),
|
||||
@@ -99,4 +103,9 @@ mod tests {
|
||||
let result = process_network("devices", &devices);
|
||||
assert!(result[0].just_mac);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_ula_prefix_constant() {
|
||||
assert_eq!(ULA_PREFIX, "fd59:de0a:bff5::/48");
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user