[Dnsmasq-discuss] [PATCH] DHCPv6 - network booting 'address in use'

Petr Menšík pemensik at redhat.com
Wed Sep 22 14:33:26 UTC 2021

I made error in patch2. Fixed it and added patch3, adding support for
client-arch also for IPv6.

I have used following configuration for dnsmasq on libvirt network:


# dhcpv6s for Client System Architecture Type (61)
# Client is PXE booting over EFI without iPXE ROM; send EFI version of iPXE chainloader

tftp-root=/tftproot # use /var/lib/tftproot as alternative, tftp-server package

# Use static allocated only, replace with MAC of your client VM

It requires radvd running on the the same host, because I think dnsmasq itself cannot provide this combination.
Interface has to broadcast those flags: AdvSendAdvert on; AdvManagedFlag on;

Now create a new VM using libvirt (virt-manager), no disk image.
I used EFI bios, but I expect any TianoCore firmware powered machine would
behave the same. Leave IPv4 booting not working, it is tried first. Then IPv6 is tried.
In combination with radvd, it would require two addresses.
One for plain IP address, the second for obtaining also boot url and parameters.
Depending on their order, it may boot even without a change. Sometimes.
It should boot always after those patches, increasing reliability of DHCP assignments.


On 9/20/21 11:55, Harald Jensas wrote:
> On 9/17/21 21:16, Petr Menšík wrote:
>> Hi Harald, Simon,
>> I made an alternative change, which I think has similar output. I
>> think the use of DHCP6UNSPEC is suspicious itself and does not have
>> any good error code assigned by RFC 8415, because it should not
>> result in an error. I have tried to add also MUST require from the
>> RFC, refusing off-link requests with NotOnLink error. Not yet tested
>> it myself, I have no IPv6 booting environment available (yet). That
>> is in patch1.
>> Patch2 is just bunch of const changes, reduction of repeated status
>> code filling into dedicated function. Should not change behaviour,
>> just reduces few lines and some cosmetic changes.
> Thanks Petr!
> I did a couple of IPv6 network boot tests using your patches and can
> confirm that it works as expected.
> -- 
> Harald
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss

Petr Menšík
Software Engineer
Red Hat, http://www.redhat.com/
email: pemensik at redhat.com
PGP: DFCF908DB7C87E8E529925BC4931CA5B6C9FC5CB
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20210922/c02b01b4/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Add-support-for-option6-names-of-RFC-5970.patch
Type: text/x-patch
Size: 937 bytes
Desc: not available
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20210922/c02b01b4/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Move-dhcp6-status-code-to-subroutine-add-consts.patch
Type: text/x-patch
Size: 12949 bytes
Desc: not available
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20210922/c02b01b4/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Offer-alternative-DHCPv6-address-if-requested-is-tak.patch
Type: text/x-patch
Size: 3846 bytes
Desc: not available
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20210922/c02b01b4/attachment-0005.bin>

More information about the Dnsmasq-discuss mailing list