|
@@ -1041,10 +1041,17 @@ int dhcp_create_request ( struct dhcp_packet *dhcppkt,
|
1041
|
1041
|
return rc;
|
1042
|
1042
|
}
|
1043
|
1043
|
|
1044
|
|
- /* Add client UUID, if we have one. Required for PXE. */
|
|
1044
|
+ /* Add client UUID, if we have one. Required for PXE. The
|
|
1045
|
+ * PXE spec does not specify a byte ordering for UUIDs, but
|
|
1046
|
+ * RFC4578 suggests that it follows the EFI spec, in which the
|
|
1047
|
+ * first three fields are little-endian.
|
|
1048
|
+ */
|
1045
|
1049
|
client_uuid.type = DHCP_CLIENT_UUID_TYPE;
|
1046
|
1050
|
if ( ( len = fetch_uuid_setting ( NULL, &uuid_setting,
|
1047
|
1051
|
&client_uuid.uuid ) ) >= 0 ) {
|
|
1052
|
+ __bswap_32s ( &client_uuid.uuid.canonical.a );
|
|
1053
|
+ __bswap_16s ( &client_uuid.uuid.canonical.b );
|
|
1054
|
+ __bswap_16s ( &client_uuid.uuid.canonical.c );
|
1048
|
1055
|
if ( ( rc = dhcppkt_store ( dhcppkt, DHCP_CLIENT_UUID,
|
1049
|
1056
|
&client_uuid,
|
1050
|
1057
|
sizeof ( client_uuid ) ) ) != 0 ) {
|