diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2020-10-02 13:15:44 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2020-10-06 19:50:50 +0200 |
commit | 5460bde5c5408d5fd518d5739a679a696a420f40 (patch) | |
tree | b94ecaca3a0d45efdaa479201d546ddaf9e7894c /src/network/networkd-link.c | |
parent | network: introduce link_serialize_ipv4ll() (diff) | |
download | systemd-5460bde5c5408d5fd518d5739a679a696a420f40.tar.xz systemd-5460bde5c5408d5fd518d5739a679a696a420f40.zip |
network: introduce link_serialize_dhcp6_client()
Diffstat (limited to '')
-rw-r--r-- | src/network/networkd-link.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index db01654699..864ad1d132 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -3515,18 +3515,9 @@ int link_save(Link *link) { if (r < 0) goto fail; - if (link->dhcp6_client) { - _cleanup_free_ char *duid = NULL; - uint32_t iaid; - - r = sd_dhcp6_client_get_iaid(link->dhcp6_client, &iaid); - if (r >= 0) - fprintf(f, "DHCP6_CLIENT_IAID=0x%x\n", iaid); - - r = sd_dhcp6_client_duid_as_string(link->dhcp6_client, &duid); - if (r >= 0) - fprintf(f, "DHCP6_CLIENT_DUID=%s\n", duid); - } + r = link_serialize_dhcp6_client(link, f); + if (r < 0) + goto fail; r = fflush_and_check(f); if (r < 0) |