Re: [Dnsmasq-discuss] DHCP, how to ignore the client MAC address?

2019-01-08 Thread john doe
On 1/8/2019 11:31 AM, smicha wrote:
> Hi John,
> 
> thanks for your reply.
> 
> I did some tests with your hints.
> 
> On 7.1.2019 17:41, john doe wrote:
>>
>> Some hints from dnsmasq.conf:
>>
>> # Give the machine which says its name is "bert" IP address
>> # 192.168.0.70 and an infinite lease
>> #dhcp-host=bert,192.168.0.70,infinite
> 
> Do not work with my setup, because when we re-deploy a VM, the MAC
> address will be autom. changed.
> The re-delpoyed VM will than get a different IP as the old vm had before.
> 

I just tested this option  and the behavior described is correct with
dnsmasq 2.76, from the man page:

"--dhcp-host=lap,192.168.0.199 tells dnsmasq to always allocate the
machine lap the IP address 192.168.0.199.
Addresses allocated like this are not constrained to be in the range
given by the --dhcp-range option, but they must be in the same subnet as
some valid dhcp-range. For subnets which don't need"

As long as a client use the hostname ("lap") the same IP will always be
given to that client, the MAC address is not used.

>>
>> See also (1) for more info on 'dhcp-host'.
>>
>>
>> 1)  http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html
> 
> 
> Maybe is it possible to "patch" the code of dnsmasq, where dnsmasq can
> ignore the MAC address in the DHCP task?
> 

Possibly, more nolageable dnsmasqer would need to chime in to do that
though! :)
If '--dhcp-host=hostname,IP' is not working for you more info would need
to be provided.

-- 
John Doe

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


Re: [Dnsmasq-discuss] Patch to cache SRV records - updated version (#3)

2019-01-08 Thread Mufasa
The requested core dump files have been sent.  I updated my CFLAGS to use -g 
instead of -O2 and executed the ulimit command immediately before dnsmasq is 
launched (same script) in the fresh container.

Because of the default behavior of Ubuntu’s Docker image, core dump files were 
not being generated nor could I set the core dump output location to a 
directory instead of the non-functional apport configuration default, so I made 
these additional changes to my environment to generate the files:

"docker —run”, the command to launch the container,  got new parameters 
"--privileged --ulimit core=-1” per recommendations I found on generating core 
dumps in a container.  This was in addition to running the ulimit command in 
the shell script I start dnsmasq from.

The launch script now does this to set the core dump location:
echo '/tmp/core.%h.%e.%t' > /proc/sys/kernel/core_pattern

-Daniel

> On Jan 8, 2019, at 3:14 AM, Simon Kelley  wrote:
> 
> Thanks for the feedback, and for tracking the bleeding-edge code. The
> following should help get useful information.
> 
> 1) Replace -O2 with -g in your compilation flags
> 2) run the command "ulimit -c unlimited" from the shell you start
> dnsmasq from.
> 
> When it goes bang, send me the core dump and the dnsmasq binary.
> 

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


Re: [Dnsmasq-discuss] Patch to cache SRV records - updated version (#3)

2019-01-08 Thread Simon Kelley


On 08/01/2019 03:46, Mufasa wrote:
> On 01/07/2019 08:32 AM, Simon Kelley wrote:
>>/I've worked through the patch, and been inspired to clean up a few 
>>/>/long-standing nasty bits. This has the consequence that the mechanisms 
>>/>/which were added to enable storage of DNSKEY and DS RRtypes during the 
>>/>/the DNSSEC campaign are now much more general, and I've used them to 
>>/>/implement SRV caching. The new code is therefore all mine, as are any 
>>/>/bugs, but the net effect is the same as Jeremy's (I hope). />//>//>/I 
>>didn't implement a config switch to disable caching of SRV records, 
>>/>/because I can't conceive of a situation where such would be necessary. 
>>/>//>//>/Code is in the git repo now, and we're eating the new dog food here. 
>>/>/Please test away./
> 
> New to the list but just wanted to report my experience with the “new
> dog food”.
> 
> I use dnsmasq in Docker and have a script that will fully build my
> configuration from the official Ubuntu docker image and the dnsmasq git
> repository HEAD.  Its been working well for almost a year now.  I only
> once had to rollback a commit when it broke compilation and after some
> waiting, a new commit fixed the issue.
> 
> After updating to commit 5b99eae59d59a8e34a7e512059b98bbd803312f2 today,
> I’m finding that it dies with a "Segmentation fault (core dumped)" in
> about 30 minutes or less.
> 
> I compile it with CFLAGS='-Wall -W -O2 -DNO_IPV6 and launch it with
> /usr/local/sbin/dnsmasq -d --log-facility=/var/log/dnsmasq.log
> 
> If you have any advice on capturing more information about the segfault,
> let me know.
> 

Thanks for the feedback, and for tracking the bleeding-edge code. The
following should help get useful information.

1) Replace -O2 with -g in your compilation flags
2) run the command "ulimit -c unlimited" from the shell you start
dnsmasq from.

When it goes bang, send me the core dump and the dnsmasq binary.


Cheers,

Simon.

> -Daniel
> 
> ___
> 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] DHCP, how to ignore the client MAC address?

2019-01-08 Thread smicha

Hi John,

thanks for your reply.

I did some tests with your hints.

On 7.1.2019 17:41, john doe wrote:


Some hints from dnsmasq.conf:

# Give the machine which says its name is "bert" IP address
# 192.168.0.70 and an infinite lease
#dhcp-host=bert,192.168.0.70,infinite


Do not work with my setup, because when we re-deploy a VM, the MAC 
address will be autom. changed.
The re-delpoyed VM will than get a different IP as the old vm had 
before.



# Always give the host with client identifier 01:02:02:04
# the IP address 192.168.0.60
#dhcp-host=id:01:02:02:04,192.168.0.60

# Always give the host with client identifier "marjorie"
# the IP address 192.168.0.60
#dhcp-host=id:marjorie,192.168.0.60


OK, the setting of the DHCP Client ID on the linux clients to example 
the "hostname" will fix the problem.
But, as far as I see, I can not change or set the DHCP Client-ID on 
Windows systems :-(
Or, when we need to run a vm appliance, where I do not have access to 
the OS, this option will also not work.


Do you have an other idea how I can fix the problem?


# Enable the address given for "judge" in /etc/hosts
# to be given to a machine presenting the name "judge" when
# it asks for a DHCP lease.
#dhcp-host=judge


See also (1) for more info on 'dhcp-host'.


1)  http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html



Maybe is it possible to "patch" the code of dnsmasq, where dnsmasq can 
ignore the MAC address in the DHCP task?



Many Thanks
Michael

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