8341a5c381
Separate fields are replaced with a struct. Second second duid type field is removed. The first field was used to carry the result of DUIDType= configuration, and the second was either a copy of this, or contained the type extracted from DuidRawData. The semantics are changed so that the type specified in DUIDType is always used. DUIDRawData= no longer overrides the type setting. The networkd code is now more constrained than the sd-dhcp code: DUIDRawData cannot have 0 length, length 0 is treated the same as unsetting. Likewise, it is not possible to set a DUIDType=0. If it ever becomes necessary to set type=0 or a zero-length duid, the code can be changed to support that. Nevertheless, I think that's unlikely. This addresses #3127 § 1 and 3. v2: - rename DUID.duid, DUID.duid_len to DUID.raw_data, DUID.raw_data_len
19 lines
541 B
Plaintext
19 lines
541 B
Plaintext
%{
|
|
#include <stddef.h>
|
|
#include "conf-parser.h"
|
|
#include "networkd-conf.h"
|
|
%}
|
|
struct ConfigPerfItem;
|
|
%null_strings
|
|
%language=ANSI-C
|
|
%define slot-name section_and_lvalue
|
|
%define hash-function-name networkd_gperf_hash
|
|
%define lookup-function-name networkd_gperf_lookup
|
|
%readonly-tables
|
|
%omit-struct-type
|
|
%struct-type
|
|
%includes
|
|
%%
|
|
DHCP.DUIDType, config_parse_duid_type, 0, offsetof(Manager, duid.type)
|
|
DHCP.DUIDRawData, config_parse_duid_rawdata, 0, offsetof(Manager, duid)
|