[Dnsmasq-discuss] poll_resolv concerns

John Knight John.Knight at belkin.com
Tue Oct 18 21:22:26 BST 2016


Hi,

I have some doubts and concerns regarding the dnsmasq.c function poll_resolv().  As I understand the code, this function has a for loop that iterates through a linked list of resolv_files... and checks if any resolve file has changed. The latest variable is set to point to the file with the latest timestamp... in essence, which file changed last.  And for the latest file, reload_servers is called.

First, I don't understand the scenario in which there may be multiple resolv files; when might this happen?

Secondly, I am concerned on what might happen if there is a failure to reload_servers?  The main loop of this function has picked only one file to reload from all in the list, but if reload_servers should fail to read this file, then it does not try to reload_servers() for any of the other files on the list that may have timestamps showing change.  And to the doubters, in my testing, I am seeing reload_server failed to read the /etc/resolv.conf file as it is in transition (being updated)... so a failure to find a server is possible.

I guess what I am concerned about the most is in the case of multiple resolv files.... a failure to reload_servers() could leave dnsmasq without any servers to use... even in the case where another resolv file might have legitimate server info but was skipped over because its timestamp was less than the latest.

This function seems a bit problematic. Perhaps I am missing something or just don't understand it correctly. Comments?

Thanks,

John


__________________________________________________________________ Confidential This e-mail and any files transmitted with it are the property of Belkin International, Inc. and/or its affiliates, are confidential, and are intended solely for the use of the individual or entity to whom this e-mail is addressed. If you are not one of the named recipients or otherwise have reason to believe that you have received this e-mail in error, please notify the sender and delete this message immediately from your computer. Any other use, retention, dissemination, forwarding, printing or copying of this e-mail is strictly prohibited. Pour la version fran?aise: http://www.belkin.com/email-notice/French.html F?r die deutsche ?bersetzung: http://www.belkin.com/email-notice/German.html __________________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20161018/45de7813/attachment.html>


More information about the Dnsmasq-discuss mailing list