dhcp: don't request DHCP6 client-id option with internal client

sd_dhcp6_client_set_request_option() only accepts a white-listed
set of options. Unexpected options are rejected with -EINVAL.
Currently supported are only:

  - SD_DHCP6_OPTION_DNS_SERVERS
  - SD_DHCP6_OPTION_DOMAIN_LIST
  - SD_DHCP6_OPTION_SNTP_SERVERS
  - SD_DHCP6_OPTION_NTP_SERVER
  - SD_DHCP6_OPTION_RAPID_COMMIT

As such, SD_DHCP6_OPTION_CLIENTID is not accepted and requesting it
was silently ignored.

Fixes: d2dd3b2c90
This commit is contained in:
Thomas Haller 2018-12-14 16:06:20 +01:00
parent 22e276a06b
commit fed16ff1cb
2 changed files with 3 additions and 1 deletions

View file

@ -427,6 +427,8 @@ nm_dhcp_dhclient_create_config (const char *interface,
add_hostname6 (new_contents, hostname);
add_request (reqs, "dhcp6.name-servers");
add_request (reqs, "dhcp6.domain-search");
/* FIXME: internal client does not support requesting client-id option. Does this even work? */
add_request (reqs, "dhcp6.client-id");
}

View file

@ -133,7 +133,7 @@ static const ReqOption dhcp4_requests[] = {
};
static const ReqOption dhcp6_requests[] = {
{ SD_DHCP6_OPTION_CLIENTID, REQPREFIX "dhcp6_client_id", TRUE },
{ SD_DHCP6_OPTION_CLIENTID, REQPREFIX "dhcp6_client_id", FALSE },
/* Don't request server ID by default; some servers don't reply to
* Information Requests that request the Server ID.