Skip to content

lease-sync: add DHCP lease sync daemon#29135

Draft
pgaufillet wants to merge 1 commit intoopenwrt:masterfrom
pgaufillet:add-lease-sync
Draft

lease-sync: add DHCP lease sync daemon#29135
pgaufillet wants to merge 1 commit intoopenwrt:masterfrom
pgaufillet:add-lease-sync

Conversation

@pgaufillet
Copy link
Copy Markdown

@pgaufillet pgaufillet commented Apr 12, 2026

📦 Package Details

Maintainer: @pgaufillet

Description:
Add lease-sync, an event-driven daemon that synchronizes DHCP leases between dnsmasq instances on clustered OpenWrt routers.

Features:

  • Real-time lease replication via dnsmasq ubus add_lease/delete_lease
  • AES-256-GCM encrypted UDP peer-to-peer protocol
  • Last-Writer-Wins conflict resolution with millisecond timestamps
  • Full sync on startup with peer reconciliation
  • Retry queue for transient ubus failures
  • IPv4 and IPv6 lease support

Requires the dnsmasq ubus lease methods patch: openwrt/openwrt#22904.
That PR must be merged first for lease-sync to function.

Part of the OpenWrt HA cluster proposal:

Source: https://github.com/pgaufillet/lease-sync (v1.1.0)


🧪 Run Testing Details

  • OpenWrt Version: 24.10 and 25.12
  • OpenWrt Target/Subtarget: x86/64, mediatek/filogic
  • OpenWrt Device: Generic x86_64 VM, ASUS TUF Gaming AX4200

✅ Formalities

  • I have reviewed the CONTRIBUTING.md file for detailed contributing guidelines.

Add lease-sync, an event-driven daemon that synchronizes DHCP
leases between dnsmasq instances on clustered OpenWrt routers.

Features:
- Real-time lease replication via dnsmasq ubus add_lease/delete_lease
- AES-256-GCM encrypted UDP peer-to-peer protocol
- Last-Writer-Wins conflict resolution with millisecond timestamps
- Full sync on startup with peer reconciliation
- Retry queue for transient ubus failures
- IPv4 and IPv6 lease support

Requires the dnsmasq ubus lease methods patch (openwrt/openwrt).

Source: https://github.com/pgaufillet/lease-sync (v1.1.0)
Tested on: OpenWrt 24.10 and 25.12 (x86_64 + filogic), production.

Signed-off-by: Pierre Gaufillet <pierre.gaufillet@bergamote.eu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant