mirror of
https://github.com/systemd/systemd.git
synced 2024-12-23 21:35:11 +03:00
parent
2da796cabb
commit
80500bb5d4
@ -127,7 +127,7 @@
|
||||
<ulink url="https://tools.ietf.org/html/rfc3315#section-9">RFC 3315</ulink>
|
||||
for a description of all the options.</para>
|
||||
|
||||
<para>The following values are understood:
|
||||
<para>This takes an integer in the range 0…65535, or one of the following string values:
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><option>vendor</option></term>
|
||||
|
@ -19,6 +19,7 @@ typedef enum DUIDType {
|
||||
DUID_TYPE_UUID = 4,
|
||||
_DUID_TYPE_MAX,
|
||||
_DUID_TYPE_INVALID = -EINVAL,
|
||||
_DUID_TYPE_FORCE_U16 = UINT16_MAX,
|
||||
} DUIDType;
|
||||
|
||||
/* RFC 3315 section 9.1:
|
||||
|
@ -1154,11 +1154,19 @@ int config_parse_duid_type(
|
||||
|
||||
type = duid_type_from_string(type_string);
|
||||
if (type < 0) {
|
||||
log_syntax(unit, LOG_WARNING, filename, line, type,
|
||||
uint16_t t;
|
||||
|
||||
r = safe_atou16(type_string, &t);
|
||||
if (r < 0) {
|
||||
log_syntax(unit, LOG_WARNING, filename, line, r,
|
||||
"Failed to parse DUID type '%s', ignoring.", type_string);
|
||||
return 0;
|
||||
}
|
||||
|
||||
type = t;
|
||||
assert(type == t); /* Check if type can store uint16_t. */
|
||||
}
|
||||
|
||||
if (!isempty(p)) {
|
||||
usec_t u;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user