summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2020-04-24 09:11:12 +0200
committerThomas Haller <thaller@redhat.com>2020-04-24 10:09:50 +0200
commit03b606d1ffc6fd19394490fc310b22026abfca32 (patch)
tree02ce033f875d047e5f633707157df15cd5c59d9a
parent3a2858a2fddfa306f9b37ed02055eb75c7f89dea (diff)
downloadNetworkManager-03b606d1ffc6fd19394490fc310b22026abfca32.tar.gz
dhcp: set MUD URL in DHCPv6 request for systemd DHCP client
-rw-r--r--src/dhcp/nm-dhcp-systemd.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/dhcp/nm-dhcp-systemd.c b/src/dhcp/nm-dhcp-systemd.c
index 983f4e2a65..72f60ccbf0 100644
--- a/src/dhcp/nm-dhcp-systemd.c
+++ b/src/dhcp/nm-dhcp-systemd.c
@@ -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");