dhcp: sd-dhcp6-client: delay setting the DUID and don't fail constructor
authorThomas Haller <thaller@redhat.com>
Wed, 4 Mar 2015 10:47:44 +0000 (11:47 +0100)
committerThomas Haller <thaller@redhat.com>
Wed, 4 Mar 2015 10:52:26 +0000 (11:52 +0100)
commit2e788fac4589e7565f6056d0a1624255752824ff
treeae5a3701dbc80df6e3fef6059312c862b752691f
parent231b0390a5a3620025abcfdfcac94de2ecbc065a
parentbd3dc1f7f37fb0fd3485e588375401cdb1712786
dhcp: sd-dhcp6-client: delay setting the DUID and don't fail constructor

reimport systemd dhcp code to bring patch cc22955cfefb4bd6e7a135f1ec95fb5a07ba9ce3.

    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().

Conflicts:
src/dhcp-manager/systemd-dhcp/src/libsystemd-network/sd-dhcp6-client.c
src/dhcp-manager/systemd-dhcp/src/libsystemd-network/sd-dhcp6-client.c
src/dhcp-manager/systemd-dhcp/src/shared/util.c