diff options
| author | Sebastien Bacher <seb128@ubuntu.com> | 2020-07-02 12:20:27 +0200 |
|---|---|---|
| committer | Sebastien Bacher <seb128@ubuntu.com> | 2020-07-02 12:20:27 +0200 |
| commit | 486e0bef719d78ee55d2166b0bfb4fa684c09854 (patch) | |
| tree | aead4c1cc30eb61a2d9dec70f7c8339904506fad /src/dhcp/nm-dhcp-systemd.c | |
| parent | 39143df7aed46e83f8c68ea9ad6d24cfdf5a1dd8 (diff) | |
| parent | 10ae7d8cd706062742d0cdb1803d49909aef9e06 (diff) | |
Merge branch 'upstream/latest' of https://salsa.debian.org/utopia-team/network-manager into upstream/latest
Diffstat (limited to 'src/dhcp/nm-dhcp-systemd.c')
| -rw-r--r-- | src/dhcp/nm-dhcp-systemd.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/dhcp/nm-dhcp-systemd.c b/src/dhcp/nm-dhcp-systemd.c index 23862e9e..f65937d8 100644 --- a/src/dhcp/nm-dhcp-systemd.c +++ b/src/dhcp/nm-dhcp-systemd.c @@ -573,6 +573,7 @@ ip4_start (NMDhcpClient *client, size_t client_id_len; struct in_addr last_addr = { 0 }; const char *hostname; + const char *mud_url; int r, i; g_return_val_if_fail (!priv->client4, FALSE); @@ -688,6 +689,15 @@ ip4_start (NMDhcpClient *client, } } + mud_url = nm_dhcp_client_get_mud_url (client); + if (mud_url) { + r = sd_dhcp_client_set_mud_url (sd_client, mud_url); + if (r < 0) { + nm_utils_error_set_errno (error, r, "failed to set DHCP MUDURL: %s"); + return FALSE; + } + } + r = sd_dhcp_client_set_callback (sd_client, dhcp_event_cb, client); if (r < 0) { nm_utils_error_set_errno (error, r, "failed to set callback: %s"); @@ -725,7 +735,8 @@ lease_to_ip6_config (NMDedupMultiIndex *multi_idx, { gs_unref_object NMIP6Config *ip6_config = NULL; gs_unref_hashtable GHashTable *options = NULL; - struct in6_addr tmp_addr, *dns; + struct in6_addr tmp_addr; + const struct in6_addr *dns; uint32_t lft_pref, lft_valid; char addr_str[NM_UTILS_INET_ADDRSTRLEN]; char **domains; @@ -894,6 +905,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; @@ -976,6 +988,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"); |