From dfcf91c9491cc4ccd8642219a7a8b0b4c4424ee0 Mon Sep 17 00:00:00 2001 From: josh Date: Wed, 13 May 2026 22:08:48 -0400 Subject: [PATCH] Fix dhcp-hostsfile to explicitly set known tag for PXE clients Bare MACs in dhcp-hostsfile were not auto-setting the known tag in proxy DHCP mode, causing dhcp-ignore=tag:!known to drop all requests. Explicitly write set:known per host entry. Co-Authored-By: Claude Opus 4.6 --- internal/pxe/supervisor.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/pxe/supervisor.go b/internal/pxe/supervisor.go index 0fe41df..bbb5250 100644 --- a/internal/pxe/supervisor.go +++ b/internal/pxe/supervisor.go @@ -79,11 +79,11 @@ func (s *Supervisor) writeConfig(hosts []model.Host) error { confPath := filepath.Join(s.cfg.RuntimeDir, "dnsmasq.conf") hostsPath := filepath.Join(s.cfg.RuntimeDir, "dhcp-hostsfile") - var macs []string + var lines []string for _, h := range hosts { - macs = append(macs, h.MAC) + lines = append(lines, h.MAC+",set:known") } - if err := os.WriteFile(hostsPath, []byte(strings.Join(macs, "\n")+"\n"), 0o644); err != nil { + if err := os.WriteFile(hostsPath, []byte(strings.Join(lines, "\n")+"\n"), 0o644); err != nil { return fmt.Errorf("pxe: write dhcp-hostsfile: %w", err) }