Skip to content

overlays.ifstate: dhcpcd with the upstream fix for lost leases after a carrier change - #42

Merged
andrewthomaslee merged 1 commit into
mainfrom
dhcpcd-eloop-fix
Nov 17, 2026
Merged

andrewthomaslee merged 1 commit into
mainfrom
dhcpcd-eloop-fix

Conversation

@andrewthomaslee

Copy link
Copy Markdown
Member

What

  • overlays/ifstate.nix: dhcpcd built with two upstream commits, guarded by versionOlder old.version "10.5.0" so they drop out when nixpkgs ships 10.5 or newer.
  • overlays/patches/dhcpcd/: the two commits, unmodified, from NetworkConfiguration/dhcpcd PR 611 (3375f52 "eloop: always remove event from list on delete", cf232b9 "DHCP6: Delete the eloop event before closing an ia listener socket").
  • flake-parts/packages.nix: packages.<system>.dhcpcd, so the patched build is buildable directly.
  • README.md: overlays.ifstate is the host-networking set; patches nixpkgs lacks live here.

Why

dhcpcd 10.3.2 closes a DHCPv6 address socket before it removes it from its event loop. The loop keeps a stale entry, the next socket that reuses the descriptor number fails with eloop_event_add: No such file or directory, and nobody reads it. After any carrier change DHCPv4 or DHCPv6 then does not come back. Upstream issue 596 reports the same lines; 10.5.0 has the fix.

Found by the clanServices netif probes (specs/netif.md N16, §8.3). Run alone on euc-hel-0:

dhcpcd Five ip link set down/up cycles: DHCPv4 back, DHCPv6 back Errors
nixpkgs 10.3.2 0 of 5, 1 of 5 2–5 per cycle
this package 5 of 5, 5 of 5 (four runs) none

Checks

  • fmt: 0 files changed.
  • check (nix run .#flake-check): all checks passed.
  • nix build .#dhcpcd: both patches apply; the same store path ran in the probes above.

Reviewer notes

  • Behaviour change: every machine that applies overlays.ifstate or overlays.default gets this dhcpcd on its next org-pkgs bump and deploy, including machines that use plain networking.dhcpcd. The change is the two upstream bug-fix commits only.
  • Not in this PR: dhcpcd through 10.3.2 also has CVE-2026-56113, 56114, 56116 and 56117, fixed in 10.5.0. Moving the overlay to 10.5.2 is a separate decision; 10.5.2 passed the same probe loop once.
  • Merge order: this first; clanServices then bumps org-pkgs in its own PR.

🤖 Generated with Claude Code

dhcpcd 10.3.x closes a DHCPv6 address socket before deleting it from
its event loop. After a carrier change the next socket that reuses the
descriptor number is never read, and DHCPv4 or DHCPv6 does not recover
(upstream issue 596). Carry the two upstream commits of PR 611 until
nixpkgs ships 10.5.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@andrewthomaslee
andrewthomaslee enabled auto-merge (squash) November 17, 2026 05:24
@andrewthomaslee
andrewthomaslee merged commit 3c80f8a into main Nov 17, 2026
3 checks passed
@andrewthomaslee
andrewthomaslee deleted the dhcpcd-eloop-fix branch November 17, 2026 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant