diff options
| author | Michael Biebl <biebl@debian.org> | 2020-06-28 18:58:14 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2020-06-28 18:58:14 +0200 |
| commit | a54ac63bbf9b2c71026ac9028a8ffaf186cf3c82 (patch) | |
| tree | 6a32883bd916c4096357b35298beff6db8bcd0b5 /src/dhcp/nm-dhcp-systemd.c | |
| parent | 45e8e1149027529194982212c804c0468aa01d98 (diff) | |
New upstream version 1.25.90 upstream/1.25.90
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"); |