diff --git a/src/dhcp/nm-dhcp-systemd.c b/src/dhcp/nm-dhcp-systemd.c index 9b1a44332c..2e552cd4ff 100644 --- a/src/dhcp/nm-dhcp-systemd.c +++ b/src/dhcp/nm-dhcp-systemd.c @@ -915,6 +915,7 @@ ip6_start (NMDhcpClient *client, NMDhcpSystemdPrivate *priv = NM_DHCP_SYSTEMD_GET_PRIVATE (self); const char *iface = nm_dhcp_client_get_iface (client); const GByteArray *hwaddr; + const char *hostname; int r, i; g_assert (priv->client4 == NULL); @@ -995,6 +996,13 @@ ip6_start (NMDhcpClient *client, goto error; } + hostname = nm_dhcp_client_get_hostname (client); + r = sd_dhcp6_client_set_fqdn (priv->client6, hostname); + if (r < 0) { + _LOGW ("failed to set DHCP hostname to '%s' (%d)", hostname, r); + goto error; + } + r = sd_dhcp6_client_start (priv->client6); if (r < 0) { _LOGW ("failed to start client (%d)", r);