On 06/11/13 11:53, unDEFER wrote:
Thanks for the bug report. I think there are two bugs here, one is yours
and one is mine.
Thank you for the great tool!
I have the bug report for you:
I'm using very simple script to test behaviour of dnsmasq with
--dhcp-script= option and DHCPv6. It looks like:
And also I want to use --leasefile-ro option. But environment variable
DNSMASQ_SERVER_DUID keeps empty string with this option.
Without --leasefile-ro it works correctly.
If I use dnsmasq only to get IPv4 addresses it also works fine.
Your bug is that with --leasefile-ro, there is _no_ leasefile (the
option is very badly named) At startup, dnsmasq calls the dhcp-script
with argument "init" and the script should output the lease database in
the same format as the leases file to stdout. Your script isn't doing
that, so dnsmasq is starting with an empty lease database and no DUID
That brings us to my bug. If dnsmasq doesn't read the value of the DUID
from the leasefile/script, it creates a new one. When dnsmasq has to
created a new DUID, it gets saved in the leasefile, but doesn't appear
in the DNSMASQ_SERVER_DUID variable: that only happens after dnsmasq
has been restarted and reads the DUID from the leasefile. That bug is
normally very hard to see, but your bug made it happen every time, so
you spotted it. I've just pushed the fix to git.
Dnsmasq-discuss mailing list