It's state, not config.

This commit is contained in:
2026-07-10 05:21:03 +00:00
parent 4feaa63da0
commit 5c26c7530a
18 changed files with 184 additions and 216 deletions

View File

@@ -62,11 +62,7 @@ log-dhcp
}
fmt.Fprintf(&sb, "dhcp-range=%s,%s,%s\n", dhcp.RangeStart, dhcp.RangeEnd, leaseTime)
// Gateway: use explicit DHCP gateway, fall back to router IP
gateway := dhcp.Gateway
if gateway == "" {
gateway = cfg.Cloud.Router.IP
}
if gateway != "" {
fmt.Fprintf(&sb, "dhcp-option=3,%s\n", gateway) // default gateway
}