From e66589a654037509ee671550c57693a177ef81e5 Mon Sep 17 00:00:00 2001 From: kurogeek Date: Tue, 3 Nov 2026 06:24:48 +0000 Subject: [PATCH] stellio: drop IPv6 workarounds now upstream in cnx-network Both interim blocks are in cnx-network b2b5daa: - 27c697a adds vlans..ipv6SubnetId (lan -> 0, others -> VLAN id), replacing the SubnetId=auto race the mkForce pins worked around. mgmt moves from 0x1 to 0xA; on AIS's bare /64 both are skipped alike. - 45643d6 is the router-radv-deprecate unit this file carried a copy of. Keeping both concatenated the two scripts into one unit running two ip-monitor loops. --- machines/stellio/configuration.nix | 91 ------------------------------ 1 file changed, 91 deletions(-) diff --git a/machines/stellio/configuration.nix b/machines/stellio/configuration.nix index 3c661c34..dfd6f1fe 100644 --- a/machines/stellio/configuration.nix +++ b/machines/stellio/configuration.nix @@ -84,97 +84,6 @@ 22 ]; - # AIS delegates a single /64 over PPPoE (seen 2026-10-02: "ppp0: DHCP: - # received delegated prefix 2405:9800:b910:1f5d::/64"). The router - # service hands out sub-prefixes with SubnetId=auto, so whichever VLAN - # interface comes up first takes the whole /64 -- on this box vlan-mgmt - # did, and vlan-lan logged "Couldn't find a suitable prefix. Ran out of - # address space": no RA prefix on lan, so clients had no global IPv6. - # Pin the ids: lan (where the clients are) always gets subnet 0, i.e. - # the entire prefix when it is a /64; mgmt asks for subnet 1, which - # fails harmlessly on a /64 (mgmt is reached over v4 and the meshes) and - # starts working unchanged if AIS ever delegates wider. Drop once - # cnx-network's router service exposes a per-VLAN subnet id. - systemd.network.networks."40-vlan-lan".dhcpPrefixDelegationConfig.SubnetId = lib.mkForce "0x0"; - systemd.network.networks."40-vlan-mgmt".dhcpPrefixDelegationConfig.SubnetId = lib.mkForce "0x1"; - - # Interim copy of cnx-network-clan 45643d6 (router/ipv6: deprecate - # withdrawn DHCPv6-PD prefixes); drop when the input is bumped past it. - # networkd never deprecates a prefix it stops announcing (systemd#29651): - # on every reboot the first PPPoE session lands on another AIS BNG, is - # torn down minutes later, and the reconnect brings a different /64. - # networkd announces the new prefix at once but clients keep the old - # one preferred for the rest of its 1800 s lifetime, so RFC 6724 source - # selection picks the dead prefix and every v6 connection fails for up - # to 30 minutes (2026-10-08 07:57). Watch vlan-* for networkd removing a - # dynamic (PD) address and send up to three RAs with that /64 at - # preferred lifetime 0, one short-lived radvd per RA (SIGKILLed: no - # shutdown RA with router lifetime 0), stopping as soon as the prefix is - # back on the interface -- a plain flap re-delegates the same /64 within - # seconds and a deprecating RA sent after networkd re-announced it would - # leave clients deprecated until the next periodic RA (08:19 today). - systemd.services.router-radv-deprecate = { - description = "Deprecate withdrawn DHCPv6-PD prefixes on the VLANs"; - wantedBy = [ "multi-user.target" ]; - after = [ "systemd-networkd.service" ]; - path = [ - pkgs.iproute2 - pkgs.ipcalc - pkgs.radvd - ]; - serviceConfig = { - Restart = "always"; - RestartSec = 2; - RuntimeDirectory = "router-radv-deprecate"; - }; - script = '' - conf=$RUNTIME_DIRECTORY/radvd.conf - pid=$RUNTIME_DIRECTORY/radvd.pid - - # /64s of the global addresses currently on an interface. - prefixes_on() { - ip -o -6 addr show dev "$1" scope global | while read -r _ _ _ a _; do - echo "$(ipcalc --no-decorate -n "$a")/''${a##*/}" - done - } - - # "Deleted 4: vlan-lan inet6 2001:db8::1/64 scope global dynamic mngtmpaddr \ valid_lft ..." - ip -o -6 monitor address | while read -r event _ dev _ addr _ scope rest; do - [[ $event == Deleted && $dev == vlan-* && $scope == global && $rest == *dynamic* ]] || continue - prefix="$(ipcalc --no-decorate -n "$addr")/''${addr##*/}" - cat > "$conf" </dev/null || true - wait $! || true - sleep 2 - done - done - ''; - }; - systemd.services.heartbeat-push = { description = "Heartbeat push to uptime monitor"; serviceConfig = {