2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-11-20 01:12:18 +00:00
Files
xcat-core/xCAT-server
Vinícius Ferrão 7a88c26b0d fix(dhcp): match a DHCPv6 reservation to the DUID the client sends
makedhcp built every DHCPv6 reservation from vpd.uuid in the byte order
that EDK2 firmware sends, for ISC DHCP and Kea alike. A client that
encodes the UUID in RFC 4122 network byte order, as RFC 6355 refers to
it, sends a different DUID and never matches its reservation.

The new duid attribute (mac.duid) selects the identifier. firmware, the
default, keeps the EDK2 order: SMBIOS 2.6 and later store the first
three UUID fields little-endian, and EDK2 copies those bytes. canonical
uses vpd.uuid in RFC 4122 order. Any other value is the DUID itself.
makedhcp reports an invalid value as an error and does not change the
DHCPv6 reservation of that node.

Like a MAC address, a DUID identifies one client, and makedhcp treats
the database as authoritative for it as it does for MACs: the node that
makedhcp updates takes a reservation that another node held under the
same DUID, in both backends. A node without an IPv6 address needs no
DHCPv6 reservation, so an invalid duid there is a warning and does not
fail the request.

ISC DHCP, the Kea reservations and the Kea query and delete matches
take the DUID from one function, so the backends cannot disagree. A
reservation still matches one DUID. makedhcp does not reserve both
orders: Kea rejects two reservations of one address in a subnet, and
the second replaces the first in the xCAT update.

(cherry picked from commit d3360f32ce5f920d945cb6f902badf4a2a0a108b)
2026-10-26 10:46:56 -03:00
..
2016-07-21 13:27:40 -04:00