]> git.ipfire.org Git - thirdparty/systemd.git/commit
sd-dhcp6-client: delay setting the DUID and don't fail constructor
authorThomas Haller <thaller@redhat.com>
Tue, 3 Mar 2015 20:06:29 +0000 (21:06 +0100)
committerTom Gundersen <teg@jklm.no>
Wed, 4 Mar 2015 10:01:39 +0000 (11:01 +0100)
commitcc22955cfefb4bd6e7a135f1ec95fb5a07ba9ce3
tree72eb7cd4eab9f469c6c3e00f2e23991c9d4b751d
parent3e43b2cd97bd82efe6a09e8b9b2e6b5f33f578a0
sd-dhcp6-client: delay setting the DUID and don't fail constructor

sd_dhcp6_client_new() tried to set the DUID based on the machine id.
If the host has no /etc/machine-id, the constructor would fail
making it impossible to create an sd_dhcp6_client instance.

Relax this and create a DUID only later as needed. This way a caller
caller can workaround a missing machine-id file and set a DUID of his
choosing via sd_dhcp6_client_set_duid().
src/libsystemd-network/sd-dhcp6-client.c