mirror of
https://github.com/jmcorgan/fips.git
synced 2026-10-30 07:37:36 +00:00
dnsmasq_swap_fips_upstream removed the loopback .fips server entries, added the one for the requested port, committed /etc/config/dhcp and restarted dnsmasq on every call, even when dnsmasq already forwarded .fips to that port. supervise calls it each time the gateway exits, and a gateway that never started never moved the entry off the daemon's port, so each failed start cut LAN DNS and DHCP for a moment and wrote the dhcp config to flash. procd's retry limit stopped that after six starts; respawning without a limit would make it continue for as long as the gateway cannot start. The swap now returns without changing anything when the only loopback .fips forward already names the target port. When the service is stopped, stop_service moves dnsmasq back to the daemon first, so the release supervise makes when the gateway then exits is a no-op as well. The maintainer-script scenarios check that a swap to the current port neither commits dhcp nor restarts dnsmasq, that a stale loopback entry beside the current one is still cleared, and that a gateway that exits before binding does not restart dnsmasq.