Hi Kristian,

FYI, changing resolv.conf format could lead libc resolver to fail, so it's 
quite dangerous change.
As I understand, you want dynamic DNS servers update with additional info 
(interface/src ip binding).
With no DBUS, can't it be done with --servers-file option (available since 
This files allow full format of --server & --rev-server and are reread on 
SIGHUP, polling is not supported at the moment.

Best Regards, Vladislav Grishenko

-----Original Message-----
From: Dnsmasq-discuss [mailto:dnsmasq-discuss-boun...@lists.thekelleys.org.uk] 
On Behalf Of Kristian Evensen
Sent: Monday, April 10, 2017 1:35 PM
To: Simon Kelley <si...@thekelleys.org.uk>
Cc: dnsmasq-discuss@lists.thekelleys.org.uk
Subject: Re: [Dnsmasq-discuss] [PATCH] Support --server syntax in resolv-file

Hi Simon,

On Fri, Apr 7, 2017 at 11:27 PM, Simon Kelley <si...@thekelleys.org.uk> wrote:
> The overriding objection to this is that it adds to the syntax and 
> semantics of the resolv-file format, but dnsmasq doesn't "own" that
> format: it's actually a libc configuration file, and dnsmasq takes 
> advantage of the fact that the format is "well known" to extract 
> useful information from it. If you start adding extra fields to 
> /etc/resolv.conf then the c-library will get upset.

I have been thinking some more about this. The reason for locking the support 
for server-strings in the resolv behind a command line option, was to avoid 
what you are describing here - compatibility issues with the existing 
resolv-file format. I assume that if anyone enables the option, they know what 
they are doing and what implications it might have. I should maybe have 
explained this better in either the commit or the addition to the man-page.

> I understand the desire to be able to specify resolvers dynamically 
> with the full set of source-address and routing options; that's 
> actually already available, and has been for a long time, using the 
> DBus interface to dnsmasq, which includes the "SetDomainServers" 
> method, which takes strings identical to argument to --server. I've 
> not looked at the code, but your previous patch to allow binding both 
> IP and interface should have automatically added that feature to 
> SetDomainServers. (if it didn't then I'd certainly take a patch to 
> correct that.)

I did a quick test and it seems that specifying servers (with the additional 
interface/ip-information) using the DBus-interface works fine. However, this 
does not help on systems not using DBus (like OpenWRT/LEDE). Do you have any 
suggestions for an acceptable way to implement this feature, without requiring 
the use DBus?

Thanks in advance for the help,

Dnsmasq-discuss mailing list

Dnsmasq-discuss mailing list

Reply via email to