stinger: move to networkd #1496

Merged
JakeHillion merged 1 commits from jj/ssxnnsqokrvu into main 2026-12-04 22:19:14 +00:00
Owner

stinger runs dhcpcd in stage 2. dhcpcd treats Nebula's interface as one of
its own, and when it stops it removes the address and route Nebula gave
it, so any switch that restarts dhcpcd takes stinger off Nebula until
Nebula is restarted. Separately, nothing names stinger's NIC eth0 any
more since its networking moved to the host module, so after a reboot it
comes up as enp1s0 and matches none of its configuration.

Moved stinger to networkd, which leaves interfaces without a matching
.network file, such as Nebula's, alone. The host module already
writes its addresses and VLAN as networkd units, and Tang runs the same
networkd configuration in initrd. networkd handles router advertisements
itself and stops accepting them when forwarding is on, which OTBR turns
on, so eth0 and iot accept them explicitly and the accept_ra sysctl for
eth0 is gone. On iot, OTBR's backbone, networkd installs the routes
other border routers advertise, which OTBR's accept_ra sysctls did
under the kernel. resolved stays off so DNS still goes through dnsmasq.

A .link file matching the NIC's MAC address names it eth0 again. udev
applies it in initrd as well as stage 2, so the name holds from boot.

Test plan:

  • Built stinger's toplevel: 10-eth0.link matches its MAC and names it
    eth0, and 40-eth0 and 40-iot carry the static addresses with
    IPv6AcceptRA=true
  • CI
stinger runs dhcpcd in stage 2. dhcpcd treats Nebula's interface as one of its own, and when it stops it removes the address and route Nebula gave it, so any switch that restarts dhcpcd takes stinger off Nebula until Nebula is restarted. Separately, nothing names stinger's NIC eth0 any more since its networking moved to the host module, so after a reboot it comes up as enp1s0 and matches none of its configuration. Moved stinger to networkd, which leaves interfaces without a matching .network file, such as Nebula's, alone. The host module already writes its addresses and VLAN as networkd units, and Tang runs the same networkd configuration in initrd. networkd handles router advertisements itself and stops accepting them when forwarding is on, which OTBR turns on, so eth0 and iot accept them explicitly and the accept_ra sysctl for eth0 is gone. On iot, OTBR's backbone, networkd installs the routes other border routers advertise, which OTBR's accept_ra sysctls did under the kernel. resolved stays off so DNS still goes through dnsmasq. A .link file matching the NIC's MAC address names it eth0 again. udev applies it in initrd as well as stage 2, so the name holds from boot. Test plan: - Built stinger's toplevel: 10-eth0.link matches its MAC and names it eth0, and 40-eth0 and 40-iot carry the static addresses with IPv6AcceptRA=true - CI
JakeHillion force-pushed jj/ssxnnsqokrvu from 00f596e479 to 8651f3c285 2026-12-04 22:01:03 +00:00 Compare
JakeHillion added 1 commit 2026-12-04 22:03:52 +00:00
stinger: move to networkd
commit-validation / validate-single-commit (pull_request) Successful in 8s
buildbot/nix-eval Build done. (30 warnings)
buildbot/nix-build Build done.
buildbot/nix-effects Build done.
25ae4332f4
stinger runs dhcpcd in stage 2. dhcpcd treats Nebula's interface as one of
its own, and when it stops it removes the address and route Nebula gave
it, so any switch that restarts dhcpcd takes stinger off Nebula until
Nebula is restarted. Separately, nothing names stinger's NIC eth0 any
more since its networking moved to the host module, so after a reboot it
comes up as enp1s0 and matches none of its configuration.

Moved stinger to networkd, which leaves interfaces without a matching
.network file, such as Nebula's, alone. The host module already
writes its addresses and VLAN as networkd units, and Tang runs the same
networkd configuration in initrd. networkd handles router advertisements
itself and stops accepting them when forwarding is on, which OTBR turns
on, so eth0 and iot accept them explicitly and the accept_ra sysctl for
eth0 is gone. On iot, OTBR's backbone, networkd installs the routes
other border routers advertise, which OTBR's accept_ra sysctls did
under the kernel. resolved stays off so DNS still goes through dnsmasq.

A .link file matching the NIC's MAC address names it eth0 again. udev
applies it in initrd as well as stage 2, so the name holds from boot.

Test plan:
- Built stinger's toplevel: 10-eth0.link matches its MAC and names it
  eth0, and 40-eth0 and 40-iot carry the static addresses with
  IPv6AcceptRA=true
- CI
JakeHillion force-pushed jj/ssxnnsqokrvu from 8651f3c285 to 25ae4332f4 2026-12-04 22:03:52 +00:00 Compare
JakeHillion merged commit 25ae4332f4 into main 2026-12-04 22:19:14 +00:00
JakeHillion deleted branch jj/ssxnnsqokrvu 2026-12-04 22:19:15 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: JakeHillion/nixos#1496