From 03b606d1ffc6fd19394490fc310b22026abfca32 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Fri, 24 Apr 2020 09:11:12 +0200 Subject: [PATCH] dhcp: set MUD URL in DHCPv6 request for systemd DHCP client --- src/dhcp/nm-dhcp-systemd.c | 10 ++++++++++ 1 file changed, 10 insertions(+) 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");