Bug #13105
closedDNS Forwarder custom options may fail after save/restore when options are only separated by newline
0%
Description
Sometimes when saving DNS Forwarder (dnsmasq) config, the custom options data gets mangled (a newline is lost, so 2 config options are munged together). This causes dnsmasq to fail to start, and basically everything is broken until you figure out what's wrong and manually fix it. Rebooting the firewall does not fix it, because the data is actually saved incorrectly in the config.xml
.
This seems to happen occasionally during config backup/restore, or sometimes when just making normal config changes. It has happened to me (rarely) for years, so definitely not a new bug. But it's a doozy to track down. I looked at the code in /etc/inc/services.inc
as well as /usr/local/pfSense/include/www/services_dnsmasq.inc
and it appears fine. I can't find a reliable way to reproduce this yet, but I wanted to log this here in case others are experiencing it (which I imagine they are) so more info can be collected. Not even ruling out a possible browser bug (maybe the formdata is getting mangled somehow during submit or a plugin is interfering?)
an example:
config as entered:
localise-queries clear-on-reload no-negcache local-ttl=1800 dhcp-ttl=0
after save / corruption:
localise-queries clear-on-reloadno-negcache local-ttl=1800 dhcp-ttl=0
another report from r/PFSENSE:
https://www.reddit.com/r/PFSENSE/comments/jeyxxn/very_occasional_config_reload_bug_in_dnsforwarder/
The fix is just to examine the config and find the invalid line and re-insert the newline, re-save and restart dnsmasq.