Add a static ULA per LAN, announced via SLAAC and RDNSS
lans.<n>.ipv6.address (a ULA /64) is assigned to the LAN, announced with an explicit prefix (networkd only announces the delegated prefix when prefix delegation is on) and advertised as RDNSS; Unbound listens and answers on it. Checked at build time: valid IPv6 CIDR, /64, fc00::/7. Covered by the onestick VM test (client SLAAC address, ping and DNS over the ULA, RA captured on the wire), assertion cases and a unit test for the /64 prefix helper. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -6,7 +6,25 @@ let
|
||||
inherit (r) ipv4;
|
||||
ip = ipv4.parse;
|
||||
|
||||
inherit (r) ipv6;
|
||||
|
||||
failures = lib.runTests {
|
||||
testPrefix64 = {
|
||||
expr = map ipv6.prefix64 [
|
||||
"fd2c:cdef:cde9::1/64"
|
||||
"fd2c:cdef:cde9:1:2:3:4:5"
|
||||
"fd00::1"
|
||||
"fd12:3456:789a:bc::1/64"
|
||||
"fd12::5:6"
|
||||
];
|
||||
expected = [
|
||||
"fd2c:cdef:cde9:0::/64"
|
||||
"fd2c:cdef:cde9:1::/64"
|
||||
"fd00:0:0:0::/64"
|
||||
"fd12:3456:789a:bc::/64"
|
||||
"fd12:0:0:0::/64"
|
||||
];
|
||||
};
|
||||
testParse = {
|
||||
expr = ip "192.168.10.1";
|
||||
expected = 3232238081;
|
||||
|
||||
Reference in New Issue
Block a user