[dhcpv6] Use DUID-UUID form of client DUID

Use the system UUID to generate the client DUID-UUID as per RFC 6355.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2013-12-05 03:18:59 +00:00
parent 03957bcb47
commit 8aab959bed
2 changed files with 28 additions and 28 deletions

View File

@@ -11,6 +11,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
#include <stdint.h>
#include <ipxe/in.h>
#include <ipxe/uuid.h>
/** DHCPv6 server port */
#define DHCPV6_SERVER_PORT 547
@@ -31,18 +32,16 @@ struct dhcpv6_option {
uint8_t data[0];
} __attribute__ (( packed ));
/** DHCP unique identifier based on link-layer address (DUID-LL) */
struct dhcpv6_duid_ll {
/** DHCP unique identifier based on UUID (DUID-UUID) */
struct dhcpv6_duid_uuid {
/** Type */
uint16_t type;
/** Hardware type */
uint16_t htype;
/** Link-layer address */
uint8_t ll_addr[0];
/** UUID */
union uuid uuid;
} __attribute__ (( packed ));
/** DHCP unique identifier based on link-layer address (DUID-LL) */
#define DHCPV6_DUID_LL 3
/** DHCP unique identifier based on UUID (DUID-UUID) */
#define DHCPV6_DUID_UUID 4
/** DHCPv6 client or server identifier option */
struct dhcpv6_duid_option {