]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/network/networkd-link.c
networkd: rework duid_{type,duid_type,duid,duid_len} setting
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 29 Apr 2016 03:23:45 +0000 (23:23 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 3 May 2016 16:23:01 +0000 (12:23 -0400)
commit8341a5c381a72d504768fe296f8e30a324eeff77
tree70dc29a424eafc5d533e2b4af2c1fcf04326ab27
parentd7df2fd317bb24d4d194dbd0d391f4dfa64d6924
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
src/network/networkd-conf.c
src/network/networkd-conf.h
src/network/networkd-dhcp4.c
src/network/networkd-dhcp6.c
src/network/networkd-gperf.gperf
src/network/networkd-link.c
src/network/networkd-manager.c
src/network/networkd-network-gperf.gperf
src/network/networkd-network.c
src/network/networkd-network.h
src/network/networkd.h