Skip to content

[v1.x] Discover dnsmasq lease files created after startup - #12

Closed
maghuro wants to merge 5 commits into
v1.0from
fix/v1-dynamic-dnsmasq-lease-discovery
Closed

maghuro wants to merge 5 commits into
v1.0from
fix/v1-dynamic-dnsmasq-lease-discovery

Conversation

@maghuro

@maghuro maghuro commented Sep 27, 2026

Copy link
Copy Markdown
Owner

Important

Local staging/review draft in the fork only. Upstream contribution guidelines require an issue before any PR.

Targeted at the maintained v1.x router-support line. This is the v1.x port of draft #5.

Summary

Make DHCP client discovery pick up dnsmasq lease files which appear after ctrld starts, including Asuswrt-Merlin 3006 Guest Network Pro / SDN instances.

  • synchronize access to the shared lease-file registry;
  • return EdgeOS's intended lease directory instead of discarding it;
  • watch Merlin's /var/lib/misc lease directory;
  • install the directory watcher before initial lease-file discovery, closing the startup blind window;
  • scan the watched directory for already-existing dynamic dnsmasq-*.leases files;
  • dynamically register newly created matching lease files;
  • preserve continued handling across create/write/remove/recreate events;
  • add regression coverage for Merlin SDN patterns and initial directory scanning.

Relation to Merlin SDN

The DNS hook work in #7 fixes forwarding for Guest Network Pro. This draft fixes the separate DHCP/client-discovery lifecycle so SDN leases can also appear after ctrld startup.

@maghuro maghuro closed this Sep 27, 2026
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