dhcp: set MUD URL in DHCPv6 request for systemd DHCP client

This commit is contained in:
Thomas Haller 2020-04-24 09:11:12 +02:00
parent 3a2858a2fd
commit 03b606d1ff

View file

@ -904,6 +904,7 @@ ip6_start (NMDhcpClient *client,
nm_auto (sd_dhcp6_client_unrefp) sd_dhcp6_client *sd_client = NULL;
GBytes *hwaddr;
const char *hostname;
const char *mud_url;
int r, i;
const guint8 *duid_arr;
gsize duid_len;
@ -986,6 +987,15 @@ ip6_start (NMDhcpClient *client,
}
}
mud_url = nm_dhcp_client_get_mud_url (client);
if (mud_url) {
r = sd_dhcp6_client_set_request_mud_url (sd_client, mud_url);
if (r < 0) {
nm_utils_error_set_errno (error, r, "failed to set mud-url: %s");
return FALSE;
}
}
if (needed_prefixes > 0) {
if (needed_prefixes > 1)
_LOGW ("dhcp-client6: only one prefix request is supported");