summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-12-14 16:06:20 +0100
committerThomas Haller <thaller@redhat.com>2018-12-19 09:23:08 +0100
commitfed16ff1cbf692dc00f4a08343b3b9689751a010 (patch)
tree8f3281d04b6199e8370f0cdd6ecf55d035cfbc03
parent22e276a06b2e9a26031a13d02755e6871c6bff22 (diff)
downloadNetworkManager-fed16ff1cbf692dc00f4a08343b3b9689751a010.tar.gz
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: d2dd3b2c90221fdfa40ca81a9fcffe6a777d95de
-rw-r--r--src/dhcp/nm-dhcp-dhclient-utils.c2
-rw-r--r--src/dhcp/nm-dhcp-systemd.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/dhcp/nm-dhcp-dhclient-utils.c b/src/dhcp/nm-dhcp-dhclient-utils.c
index be8d06d988..d6da3f5c1e 100644
--- a/src/dhcp/nm-dhcp-dhclient-utils.c
+++ b/src/dhcp/nm-dhcp-dhclient-utils.c
@@ -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");
}
diff --git a/src/dhcp/nm-dhcp-systemd.c b/src/dhcp/nm-dhcp-systemd.c
index 33c46d81e0..92152bba99 100644
--- a/src/dhcp/nm-dhcp-systemd.c
+++ b/src/dhcp/nm-dhcp-systemd.c
@@ -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.