[Dnsmasq-discuss] RHEL 6.2: dnsmasq way-back machine

2012-03-16 Thread Paul Smith
Hi all.  I have Red Hat EL 6.2 installed which provides dnsmasq 2.48
(plus some patches).  Updating this to a newer version is problematic
(for non-technical reasons: of course compiling it is no problem).

I'm trying to use the dhcp-script=/some/file option in my dnsmasq config
file, where /some/file is just a simple shell script that dumps its
arguments and environment to a file in /tmp.

I'm seeing issues in that not all the DHCP client leases are being
logged.  I have a system with two different network interfaces, both of
which are attached to the same LAN and hence get IP addresses from
(different subnets serviced by) the same dnsmasq instance.  However, I
consistently see only one of these logged.  I really have to have a 100%
reliable method of determining whenever a new lease is handed out.

I notice that the documentation of dhcp-script in the man page of the
release I'm using is not as definitive as the current latest man page
with respect to what happens if a lease is handed out while the script
is still running from a previous lease.  The current man page says
specifically that all leases will eventually have the script invoked;
the current one doesn't say so quite so clearly.

Is this a difference in functionality, where dnsmasq circa 2.48 might
miss some invocations of dhcp-script if leases are handed out all at the
same time?  Or is this supposed to work even with this older version?


Just trying to see if I should keep banging on this thing trying to get
it to work, or stop and find another way :-)

Cheers!



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


Re: [Dnsmasq-discuss] Feature Request(s)

2012-03-16 Thread Rob Zwissler
On Fri, Mar 16, 2012 at 3:10 AM, Simon Kelley wrote:

>
>> Perhaps a second expand-host-record to separately enable that?  Or a
>> more general expand-records (?) directive that would work for
>> host-record, txt-record, etc...
>>
>
> Hmm, maybe. I have a feeling that this is getting complex, especially as
> the domain added depends on --domain, which can be address-dependent.
> expand-hosts for /etc/hosts has the justification that (some) OS's work
> that way when using /etc/hosts outside dnsmasq, for dnsmasq-exclusive
> config, I'm inclined to keep it simple, especially as it's possible to
> include a simple name and an expanded name in the same line
>
> host-record=laptop, laptop.thekelleys.org.uk, 192.168.0.1
>
> The bind behavior with default expansion and a . to override seems nice,
>> simple & intuitive, what about a expand-bind-style directive to turn
>> that behavior on, so as not to break existing syntax, but give that fine
>> grained control to people who want it?
>>
>
> That breaks the rule that syntactically different configurations should
> vary by more than one pixel ;-). Missing the period at the end of a name in
> a BIND file is almost as annoying as mixing spaces and tabs in a Makefile.
>
> I've got the host-record syntax above working fine. I'll update the man
> page and changelog later today an push it out for you to play with.
>

The syntax you went with works great, it's simple, intuitive, and does the
job.

I was thinking about dnsmasq syntax and current functionality, the more I
think about it, if it was going to do any kind of host expansion, it would
be nice to do it in a similar way that bind does it with @ORIGIN, that is
to say, multiple @ORIGIN/$TTLs can be specified, and depending on where the
RR is located in the config file determines which @ORIGIN/$TTL it uses...

I'm guessing that would be require a lot rewriting the way dnsmasq parses
the config file, and at some point it's just turning dnsmasq into bind,
which it isn't...

So, good choice ;) the way it works now is great for my application.

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


Re: [Dnsmasq-discuss] Feature Request(s)

2012-03-16 Thread Rob Zwissler
Works great, thanks for the quick and excellent work Simon!

Rob


On Fri, Mar 16, 2012 at 9:26 AM, Simon Kelley wrote:

> Test release with --host-record is there now:
>
> http://www.thekelleys.org.uk/**dnsmasq/test-releases/dnsmasq-**
> 2.61test5.tar.gz
>
>
> Cheers,
>
> Simon.
>
>
>
> __**_
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss@lists.**thekelleys.org.uk
> http://lists.thekelleys.org.**uk/mailman/listinfo/dnsmasq-**discuss
>
___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] Feature Request(s)

2012-03-16 Thread Simon Kelley

Test release with --host-record is there now:

http://www.thekelleys.org.uk/dnsmasq/test-releases/dnsmasq-2.61test5.tar.gz


Cheers,

Simon.


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


Re: [Dnsmasq-discuss] Feature Request(s)

2012-03-16 Thread Simon Kelley

On 15/03/12 22:22, Rob Zwissler wrote:



Consistency is always nice, so the choice is between consistent behavior
across hosts & dnsmasq.conf style configs, or consistent behavior within
dnsmasq.conf, I'd vote for the latter, so expand-hosts would be ignored
for host-record.


Agreed


If it does expand it it for host-record but not txt-record, etc, that
seems somewhat un-intuitive.

Perhaps a second expand-host-record to separately enable that?  Or a
more general expand-records (?) directive that would work for
host-record, txt-record, etc...


Hmm, maybe. I have a feeling that this is getting complex, especially as 
the domain added depends on --domain, which can be address-dependent. 
expand-hosts for /etc/hosts has the justification that (some) OS's work 
that way when using /etc/hosts outside dnsmasq, for dnsmasq-exclusive 
config, I'm inclined to keep it simple, especially as it's possible to 
include a simple name and an expanded name in the same line


host-record=laptop, laptop.thekelleys.org.uk, 192.168.0.1




The bind behavior with default expansion and a . to override seems nice,
simple & intuitive, what about a expand-bind-style directive to turn
that behavior on, so as not to break existing syntax, but give that fine
grained control to people who want it?


That breaks the rule that syntactically different configurations should 
vary by more than one pixel ;-). Missing the period at the end of a name 
in a BIND file is almost as annoying as mixing spaces and tabs in a 
Makefile.


I've got the host-record syntax above working fine. I'll update the man 
page and changelog later today an push it out for you to play with.




Cheers,

Simon.



Rob



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