diff options
author | Michael Brown <mcb30@ipxe.org> | 2022-01-04 13:31:15 +0000 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2022-01-04 14:03:12 +0000 |
commit | f43c2fd69749bb9a44f2a3ab61b6735938432b52 (patch) | |
tree | b5afddef6c6f701312dda21aa4732e9c0253d587 /src/interface/smbios | |
parent | 9062544f6a0c69c249b90d21a08d05518aafc2ec (diff) | |
download | ipxe-f43c2fd69749bb9a44f2a3ab61b6735938432b52.tar.gz |
[settings] Support formatting UUIDs as little-endian GUIDs
The RFC4122 specification defines UUIDs as being in network byte
order, but an unfortunately significant amount of (mostly Microsoft)
software treats them as having the first three fields in little-endian
byte order.
In an ideal world, any server-side software that compares UUIDs for
equality would perform an endian-insensitive comparison (analogous to
comparing strings for equality using a case-insensitive comparison),
and would therefore not care about byte order differences.
Define a setting type name ":guid" to allow a UUID setting to be
formatted in little-endian order, to simplify interoperability with
server-side software that expects such a formatting.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/interface/smbios')
-rw-r--r-- | src/interface/smbios/smbios_settings.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/interface/smbios/smbios_settings.c b/src/interface/smbios/smbios_settings.c index 2d571f2e4..ec31b43f2 100644 --- a/src/interface/smbios/smbios_settings.c +++ b/src/interface/smbios/smbios_settings.c @@ -140,7 +140,8 @@ static int smbios_fetch ( struct settings *settings __unused, * is 2.6 or higher; we match this behaviour. */ raw = &buf[tag_offset]; - if ( ( setting->type == &setting_type_uuid ) && + if ( ( ( setting->type == &setting_type_uuid ) || + ( setting->type == &setting_type_guid ) ) && ( tag_len == sizeof ( uuid ) ) && ( smbios_version() >= SMBIOS_VERSION ( 2, 6 ) ) ) { DBG ( "SMBIOS detected mangled UUID\n" ); |