[Dnsmasq-discuss] Issues with DNSMASQ Retries using same port

Simon Kelley simon at thekelleys.org.uk
Fri Feb 25 22:39:34 UTC 2022



On 25/02/2022 21:25, Singh, Prashant via Dnsmasq-discuss wrote:
> Hi Simon,
> 
> We use DNSMASQ for resolving/forwarding the dns queries of the 
> applications hosted. We started seeing a few errors in dns resolutions. 
> We investigated and found that the issue was due to the corrupted 
> network path the request took. And it takes around 7 to 8 secs for 
> network path taken to heal, hence all the retries were also failing as 
> they took same network path.
> 
> We were exploring ways if we can force the dnsmasq to use different 
> source port for retries so that retried requests can take random network 
> path rather than bad network path.
> 
> I wanted to know the reasoning behind (if there is) the choice of using 
> the same source port for retries. And is it possible to have a 
> patch/flag in dnsmasq to update this logic?

Dnsmasq treats file descriptors and source ports as a scarce resource 
and re-uses when it can, without affecting security.

The logic is in the function allocate_rfd(), and it would be fairly 
trivial to change the behavior, but there might be unexpected 
consequences under load.


Cheers,

Simon.





> 
> Thanks,
> 
> Prashant
> 
> 
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss



More information about the Dnsmasq-discuss mailing list