[Dnsmasq-discuss] resolv-file polling

2016-04-04 Thread Testfabrik
Dear all,

according to the dnsmasq man page resolv-file polling shows the following 
behavior:

> Dnsmasq can be told to poll more than one resolv.conf file, the first file 
> name specified overrides the default, subsequent ones add to the list. This 
> is only allowed when polling; the file with the currently latest modification 
> time is the one used.

This seems not to be the completely true, but rather the most recently changed 
file with the latest modification time is used. The difference is: in order to 
have one specific file (/tmp/resolv.conf.openvpn) beat all others when 
existent, I gave it a modification time in the future. However changes to 
another resolv-file  (/tmp/resolv.conf.auto) due to DHCP renewals made that one 
active although the modification time is older.

After a first look at the source code it appears to me that this behavior is 
intended. Is it? And why? 

As Sent from my iPad

Thanks,
Michael



___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] Disable caching for some hostname

2016-04-04 Thread Simon Kelley
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

If the CNAME is updated automatically, it should have a very short (or
even zero) time-to-live in the upstream nameserver. Dnsmasq will
honour such a TTL value.

Cheers,

Simon.


On 31/03/16 10:23, Fabio Venturi wrote:
> Hello to anyone, I've setup dnsmasq on several machine, mostly to
> avoid the limitation of 3 NS in resolv.conf , as a bonus now I have
> a nice caching for name resolution (no DHCP needed). The problem
> arise with a single hostname (a CNAME really) that is updated 
> automatically under certain circumstances.
> 
> Is there a way to disable caching only for some names?
> 
> I've found a workaround, but i don't know if it's a bug: if I put
> in /etc/hosts all the real hostname to which the CNAME could refer 
> to (but NOT the CNAME itself), the CNAME is never cached and all
> requests for that CNAME are always sent to the upstream DNS.
> 
> For example, in /etc/hosts: srv1.mynet.lan  1.1.1.1 srv2.mynet.lan
> 2.2.2.2 srv3.mynet.lan  3.3.3.3
> 
> (logging the queries sent to dnsmasq, i can see the following
> request is always forwarded) # host service.mynet.lan 
> service.mynet.lan is an alias for srv2.mynet.lan. srv2.mynet.lan
> has address 2.2.2.2
> 
> I hope i've explained clearly the problem, thank you in advance for
> any hint.
> 
> My kindest regards, Fabio
> 
> 
> 
> ___ Dnsmasq-discuss
> mailing list Dnsmasq-discuss@lists.thekelleys.org.uk 
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> 
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.22 (GNU/Linux)

iQIcBAEBCAAGBQJXApQ9AAoJEBXN2mrhkTWiR0kP/RULVQ5iTfFTmwd5WqBFjTPY
Q6cw6bLXAzAOaRr3/1yU54Zwka/NglSvKDANPyEr+smxGY27I1p9hTcYpmh/nC8v
5XSXpzjMMCy24twhh3950GOvxZ1hbO19xNsC/lBWpL0B/gr7sjgL/BHO2YtL0art
TACJXx6hr+6TKAdw9i/NcPFiJWeQrZPTCPDJGfuxXEVlUr4hImC48vEFVHh/jsju
rDF4y2WpmCMtODmud8IemepKOtZ0DztHaiOokIKypzaKSY4thIaVafb5HlKOGJKi
EjkbzGEhL0JTl1KnYBKK20e18P3cQKVN/S8btNNwCsiOGyUspB3N1eDN2+SQ3dXr
f85HqWnv7+jHIZLBn986GaJirAmIADv8CIccY1DRhm113OiS5DwAZcdaDLzkF6Ul
hNB1eITXr/Jfrh45tPKpEpC/OGw+6rP2FpyEkBCsRMIudiub2Fb2lA/gBoiUQFFv
V8DKlsuwhGmLpLtFFNR+9+pfSd2n1U15vhpfbHtD7TyRzx/+71uuWmqxXQLVZ9BP
dsGuAUK8FVZv39qm+F27kDXT0diqLWxP3jA02bcHuiu3JBN7Ey2JuTioLKfUjUW1
6DZDZrBhzpix/2t7hokkVBtaoin0vz1PH9eGr41GF9zQKWiMsdaqXTUAaXwW3TIq
etK5IlnHWJP2bAG/wNfY
=F4JN
-END PGP SIGNATURE-

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] dnsmasq does not respect BOOTP's broadcast flag

2016-04-04 Thread Simon Kelley
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256


Please could you post the actual packet capture for that capture,
instead of a screenshot? I need to look at other parts of the packet
which are not shown to understand what's going on.

(Save as... from the wireshark File menu should do the trick.)


Cheers,

Simon.

On 01/04/16 03:38, 黎伟强 wrote:
> Dear all,   I got a router using dnsmasq-2.66 for DHCP
> services, and I encountered a bug that the dnsmasq server does not
> respond to my PC's DHCPREQUEST( normally it should respond with a
> DHCPNAK? ), so it takes an obvious long time to got a new IP for my
> PC. So, is this really a bug or it is just something wrong with my 
> PC(Works well with other DHCP server)?  At my first thought, I
> think it should be a bug that has been solved, so I reviewed the 
> latest(ver.2.75) dnsmasq source code, however, neither did it care 
> about this flag.   I also attached a patch for this.
> 
> 
> 
> 
> ___ Dnsmasq-discuss 
> mailing list Dnsmasq-discuss@lists.thekelleys.org.uk 
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> 
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.22 (GNU/Linux)

iQIcBAEBCAAGBQJXApMkAAoJEBXN2mrhkTWiD4EP/31oX7HXVtMhDCt18Fo6klbu
wrD4GysARnuj3NdFSQv/aEkoJ/ZZYH8g/ChPZSLNRhXd+0EuzhNGC14LnfgM7bUg
tbbhq3iT99uATuiH20UyXUVrsKwI89xa7Mr4S0VRDt2IZlXtQwEgRnaMfQcgr407
mgU4Uv6Jtpy6SBurYzRt0C897H0YFYwLryqWE5M6hJuhctlC0CcQPkb7vjBuoteM
m0idx+oBYLzmKblbZyuxZa5JsN3T4Duk46+UTTppMwljjWvwORuCRfkq0gAFlKB+
n9OwzKcqFfRix3zw7OP06c1ZVhUgw0O4pbX5/tzjU9f2GJ+rIcAk2xNHUBeDOHqf
H/TGcGReGt2vybZ6+GpM4IoKUGWhqC3AzeMzYWGraYupfbkaebHqe+tiWNknIi0s
Z+GYpUmAkRE4w+K062ldDqqueG47SIdBLKXTv0vcGmnXDFvafJcQuvr6VQrAjCIt
fC86YR77TRgvfuG8E75lpVjJGNahvBhZid8z5S8oi7HdZb3OPVtXbbOPRJ+96kTb
D4tyRTvupjWiM/29lxqOHFPtuM5MKLVGXlVql6jdMyZr51qdH/rxrHlGCuXLMU6T
V1offYG8epjrI3aLUv0eOV4xf+UJ11RSBIofQQORM8U+pfVlSjJh5FUHipJAjkH6
FoxjOxt6R1dEXbulVq5Y
=1gD8
-END PGP SIGNATURE-

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] dig for an ip address returns A record instead of NXDOMAIN

2016-04-04 Thread Simon Kelley
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

This behaviour isn't configurable (though it perhaps should be). If
you look for the string "A for A" in src/rfc1035.c you'll find where
it's implemented, if just patching it out is good enough.


Cheers,

Simon.


On 30/03/16 18:05, Jeff Weber wrote:
> I'm using dnsmasq as a local dns cache on some servers and I've
> noticed recently (due to some buggy software) that if you dig for
> an ip address you get an A record back which is set to that ip
> address. I went through the manual and wasn't able to find an
> option which seems like it could make this configurable. Is there a
> way to turn this response into an NXDOMAIN instead of returning the
> synthesized A record?
> 
> I'm using dnsmasq verision 2.66 on a Centos 7 machine.
> 
> 
> 
> ___ Dnsmasq-discuss
> mailing list Dnsmasq-discuss@lists.thekelleys.org.uk 
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> 
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.22 (GNU/Linux)

iQIcBAEBCAAGBQJXApPMAAoJEBXN2mrhkTWiLMkP/jlmgxVFLTw3m/Z64EpmS4Z2
ARJjmHwe6Hmf7obF6aKWgIKoBBg6S+IdU+LHXv6qo8EfhCUPG4VQG7CaxFY4UinO
l3bTSlGUdsXlWFJUaEdNFez6Sa5r/TeSG0qinnaYAhBiTA++EALhD13oMABu6wIc
XbvfNPoOfdgSzVggqyvptuuP7CoNpop+Nqud7cALGffV+dZG7xUjSIE+6pSpLX9x
WLclQs29ssbZfbTn44PjVYH84Wxltsnx+GEeURx3kwI6mliz2rXJJMu+U8cJEspv
IvtpNPfO0wjl4beGJ/bWzvgTiJatEvbf1kT6iU08Tc8H0LCrnaGlsiX+BWecR0iQ
tmh/s/omKgS63eOg1aSzxOkBa9nSccO69H3swL/boSvLObLS0OKWBPQvuzgi2DGQ
SLUimlh2hBQVRY7DjiVSdL4cK+vcbd71eQbCidj38gkhDbJEgra75WTsv5Xc1ZFW
ger7Y2c63YbMyEqJUPhSLqcg/zN7sZHbtH4SnZol0m0Ysv0lPXGktKYi2SYg2jem
8pWFEeIpR1HWcL0RioXhkJs9qLpe4JXE1ZHC9pRP5UaiCmyjw/kDNp5ZCEbN3/wV
5ulLo5F35jS0Ut2RlMTwWXdOoPEj8qLrr8fDClX5n/oEekSu8SKIYGT+Q836Wbbh
cZmp+ZYeLzB00Wfosc9y
=z/VO
-END PGP SIGNATURE-

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss