2016-03-31 01:33:55 +02:00
|
|
|
%{
|
2017-11-19 19:06:10 +01:00
|
|
|
#if __GNUC__ >= 7
|
|
|
|
_Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
|
|
|
|
#endif
|
2016-03-31 01:33:55 +02:00
|
|
|
#include <stddef.h>
|
|
|
|
#include "conf-parser.h"
|
|
|
|
#include "networkd-conf.h"
|
2016-11-13 04:59:06 +01:00
|
|
|
#include "networkd-manager.h"
|
2016-03-31 01:33:55 +02:00
|
|
|
%}
|
|
|
|
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
|
|
|
|
%%
|
2018-08-07 06:57:48 +02:00
|
|
|
DHCP.DUIDType, config_parse_duid_type, 0, offsetof(Manager, duid)
|
networkd: rework duid_{type,duid_type,duid,duid_len} setting
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
2016-04-29 05:23:45 +02:00
|
|
|
DHCP.DUIDRawData, config_parse_duid_rawdata, 0, offsetof(Manager, duid)
|