Skip to content

Add optional static unicast DNS records - #5

Merged
keskad merged 3 commits into
mainfrom
feat/optional-static-dns
Aug 24, 2026
Merged

Add optional static unicast DNS records#5
keskad merged 3 commits into
mainfrom
feat/optional-static-dns

Conversation

@keskad

@keskad keskad commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Optional dns section in micronet.json (enabled + records[]) renders host-record= and local=/lan/ into gateway-mode dnsmasq.
  • Omitted ip uses gateway.ip. Names are served only while mode is gateway; client/static still rely on mDNS.
  • Existing JSON without dns is unchanged (serde default; auto-created files omit the section).

Test plan

  • make test / make clippy on this branch
  • Gateway mode: set "dns": { "enabled": true, "records": [{ "name": "bigfred.lan" }] }, confirm dnsmasq.conf has host-record=bigfred.lan,<gateway.ip> and a DHCP client can resolve the name
  • enabled: false or omitted dns → no host-record= / local=/lan/
  • Invalid hostname / duplicate name (case-insensitive) is rejected on load
  • Client/static mode: dnsmasq stopped, unicast names disappear

Made with Cursor

LAN clients that use BigFred as DHCP/DNS can resolve names like bigfred.lan without editing dnsmasq by hand. Records are served only while micronet is gateway.

Co-authored-by: Cursor <cursoragent@cursor.com>
keskad and others added 2 commits August 24, 2026 10:22
addr is IPv4 (host-record) or a hostname (cname). Operator docs now match the real kit: Pi 5, required TL-SF1006P plus optional router-on-switch DHCP, and OC200 for 802.11k/v Fast Roaming.

Co-authored-by: Cursor <cursoragent@cursor.com>
dnsmasq cname= targets must be local records, so hostname addr was misleading and broken for external names like bigfred.local.

Co-authored-by: Cursor <cursoragent@cursor.com>
@keskad
keskad merged commit 2055fa9 into main Aug 24, 2026
1 check failed
@keskad
keskad deleted the feat/optional-static-dns branch August 24, 2026 10:49
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