mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-20 04:20:29 +01:00
dhcp: export the DHCPv6 FQDN option
The dhclient backend already exports all the option passed by dhclient, including the FDQN. Export it also for the systemd backend. (cherry picked from commit1621a6ddb1) (cherry picked from commitc6a7618f2b) (cherry picked from commit293b00c947)
This commit is contained in:
parent
d7ff226ceb
commit
66fc5bd354
3 changed files with 11 additions and 0 deletions
|
|
@ -182,6 +182,7 @@ const NMDhcpOption _nm_dhcp_option_dhcp6_options[] = {
|
|||
REQ (NM_DHCP_OPTION_DHCP6_DNS_SERVERS, "dhcp6_name_servers", TRUE ),
|
||||
REQ (NM_DHCP_OPTION_DHCP6_DOMAIN_LIST, "dhcp6_domain_search", TRUE ),
|
||||
REQ (NM_DHCP_OPTION_DHCP6_SNTP_SERVERS, "dhcp6_sntp_servers", TRUE ),
|
||||
REQ (NM_DHCP_OPTION_DHCP6_FQDN, "fqdn_fqdn", FALSE ),
|
||||
|
||||
/* Internal values */
|
||||
REQ (NM_DHCP_OPTION_DHCP6_NM_IP_ADDRESS, "ip6_address", FALSE ),
|
||||
|
|
|
|||
|
|
@ -159,6 +159,8 @@ typedef enum {
|
|||
NM_DHCP_OPTION_DHCP6_DNS_SERVERS = 23,
|
||||
NM_DHCP_OPTION_DHCP6_DOMAIN_LIST = 24,
|
||||
NM_DHCP_OPTION_DHCP6_SNTP_SERVERS = 31,
|
||||
NM_DHCP_OPTION_DHCP6_FQDN = 39,
|
||||
|
||||
/* Internal values */
|
||||
NM_DHCP_OPTION_DHCP6_NM_IP_ADDRESS = 1026,
|
||||
NM_DHCP_OPTION_DHCP6_NM_PREFIXLEN = 1027,
|
||||
|
|
|
|||
|
|
@ -729,6 +729,7 @@ lease_to_ip6_config (NMDedupMultiIndex *multi_idx,
|
|||
uint32_t lft_pref, lft_valid;
|
||||
char addr_str[NM_UTILS_INET_ADDRSTRLEN];
|
||||
char **domains;
|
||||
const char *s;
|
||||
nm_auto_free_gstring GString *str = NULL;
|
||||
int num, i;
|
||||
|
||||
|
|
@ -797,6 +798,13 @@ lease_to_ip6_config (NMDedupMultiIndex *multi_idx,
|
|||
str->str);
|
||||
}
|
||||
|
||||
if (sd_dhcp6_lease_get_fqdn (lease, &s) >= 0) {
|
||||
nm_dhcp_option_add_option (options,
|
||||
_nm_dhcp_option_dhcp6_options,
|
||||
NM_DHCP_OPTION_DHCP6_FQDN,
|
||||
s);
|
||||
}
|
||||
|
||||
NM_SET_OUT (out_options, g_steal_pointer (&options));
|
||||
return g_steal_pointer (&ip6_config);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue