[Dnsmasq-discuss] [Patch] dnsmasq biased round robin for new requests

Simon Kelley simon at thekelleys.org.uk
Fri Jun 3 16:43:58 BST 2011


harish badrinath wrote:
> Hello,
> I have attached a patch to change the way upstream nameservers are
> selected for new DNS resolution requests. This patch essentially gives
> a new command line option that prefers nameservers in resolv.conf
> (probably given by a DHCP server) and uses ( probably third party DNS
> server) specified by -S as a last resort for every new incoming
> request.
> 
> Hope this a feature, worthy of addition to dnsmasq. Feedback/critique
> is welcome. I have attached a patch taken again dnsmasq-2.57 tarball.
> 


A couple of comments.

+	 if (option_bool(OPT_BIASEDRR))
+		#define BIASED_RESOLUTION]

looks very strange. I think you are confusing pre-processor (compile
time) code with run-time code. Mixing the two is just wrong, and there
is no need to make a small feature like this compile-time removable.


I'm not quite sure what you are trying to achieve. If you want to use
the fastest server whenever possible, then dnsmasq already has quite
effective mechanisms to find this. If the motivation is that different
servers can produce different answers then that is a problem, but it
shouldn't be solved in this way.


Cheers,

Simon.



More information about the Dnsmasq-discuss mailing list