dnsmasq-2.21 causes the following issues on my servers 1) Any client matched in dhcp-host for DHCP requests cause dnsmasq to stop responding to DNS and DHCP requests 2) when mx-host, mx-target or localmx options are set, dnsmasq will go into a infinite loop and not fork to the background when it is started Reverting back to stable 2.15 or unstable 2.20 fixes the above issues.
found the --mx-target= bug, waiting for Uberlord to test my fix.
option.c has: if ((daemon->mxtarget || (daemon->options & OPT_LOCALMX)) && !mx) { daemon->mxnames = safe_malloc(sizeof(struct mx_srv_record)); daemon->mxnames->next = daemon->mxnames; daemon->mxnames->issrv = 0; daemon->mxnames->target = NULL; daemon->mxnames->name = safe_string_alloc(buff); } and later: for (mx = daemon->mxnames; mx; mx = mx->next) if (!mx->issrv && !mx->target) mx->target = daemon->mxtarget; This loops forever because mx->next = mx = mx->next as there is no sanity check for loops (in this case, next=self). Not quite sure what was meant to happen here, but it seems maybe it should be: daemon->mxnames->next = NULL; instead of daemon->mxnames->next = daemon->mxnames; We don't have anyone here who can test this functionality easily, so mailing upstream.
I can't easily pinpoint the dhcp-host bug because I can't test locally and gdb wasn't playing nice on Uberlord's machine. I'll let Simon know about this bug.
author mailed.
dnsmasq should probably be masked until resolution
I mean 2.21 should be masked (or keywords reset) until resolution as 2.21 is the current stable.
uberlord: please test http://www.thekelleys.org.uk/test It should definitely fix the mx-host thing and hopefully the dhcp-host stuff as well.
That test version does NOT fix the dhcp-host problem :( If it helps, here is a line that causes the problem dhcp-host=00:09:5b:84:88:7d,uberpc,192.168.2.10 Removing that line makes uberpc get a DHCP address correctly and not cause dnsmasq to eat CPU cycles like it's going out of fashion.
Bug is more harmful than potential security problems in <=2.20. I've masked 2.21 for now.
The 2.22 test version in comment #7 fixed the mx bug Just the dhcp-host bug to fix now!
the dhc-host bug manifests itself at dhcp.c:422 for (; context; context = context->current) loops forever. This is another context == context->current thing, same as last one. Not sure of the fix but I've let the author know.
test fix version from simon at: http://thekelleys.org.uk/test/dnsmasq-2.22test7.tar.gz
fix confirmed to work :)
I've let the author know.
22 released with the fix.
2.22 committed. Thanks Rob!