[Dnsmasq-discuss] [PATCH] DHCPv6 - List or Range reservation for single host

Petr Menšík pemensik at redhat.com
Fri Mar 6 22:10:56 GMT 2020

Hi Simon,

I have been adapting this feature to earlier releases and discovered one
error with prefixed address assignment. When it is calculating number of
addresses from prefixlen, it rotates only 32bit int instead of 64b uint.
Only result is assigned to 64b variable.

Two examples:


If prefix length is lower than 96, the result is zero. It means
incorrect-prefix is not refused as it should. Fix is simple, attaching
patch with it. Just rotate 64b int. It is just minor issue, but would be
nice to fix it before 2.81 is released.



On 2/13/20 12:31 AM, Simon Kelley wrote:
> On 10/02/2020 22:18, Harald Jensås wrote:
>> On Mon, 2020-02-10 at 21:37 +0000, Simon Kelley wrote:
>>> On 10/02/2020 17:56, Harald Jensås wrote:
>>>> On Fri, 2020-02-07 at 21:27 +0000, Simon Kelley wrote:
>>>>> Two commits in the repo, one adds arbitrary list of IPv6
>>>>> addresses to
>>>>> dhcp-host, second adds tags.
>>>>> Please  give them a whirl....
>>>> Thank you for working on this Simon. I have tested the following
>>>> configuration variations and there seem to be one small issue, but
>>>> overall it is working nicely.
>>>> The one test that fails is:
>>>> * Use a prefix with wildcard address:
>>>>   dhcp-host=52:54:00:3f:5c:c0,[::aa08/126],host1
>>>>   Test: FAIL
>>>>   In this configuration the first request succeeds, following
>>>>   requests get 'no address available'. Looks like it does'nt try
>>>>   the ::aa09 address when aa08 is already leased.
>>> Excellent. Thanks for the comprehensive testing. I just pushed the
>>> fix
>>> for this bug.
>> Fantastic! I can confirm the last commit fixed the bug.
>> I also re-ran some of the other smoke tests and everything works as
>> expected.
>> Thanks!
> That's great. I'm trying to catch up on all the loose ends and release
> 2.81 ASAP.
> Cheers,
> Simon.
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss

Petr Menšík
Software Engineer
Red Hat, http://www.redhat.com/
email: pemensik at redhat.com
PGP: DFCF908DB7C87E8E529925BC4931CA5B6C9FC5CB
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dnsmasq-2.81-correct-range-check-of-dhcp-host-prefix.patch
Type: text/x-patch
Size: 1540 bytes
Desc: not available
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20200306/f809251c/attachment.bin>

More information about the Dnsmasq-discuss mailing list