summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2016-08-26 08:59:33 +0000
committerintrigeri <intrigeri@boum.org>2016-08-26 10:17:04 +0000
commitfc812c35ddd9e2789a1c27bc3a352451b65d09b7 (patch)
tree306030aa15f2ff1338659ca47fefc18144197850
parentc930b7b4fe986da0ccca8b2d1d38eb92a01ced1d (diff)
dhclient: never send the hostname in DHCP requests.no-hostname4
-rw-r--r--src/dhcp-manager/nm-dhcp-dhclient-utils.c3
-rw-r--r--src/dhcp-manager/tests/test-dhcp-dhclient.c16
2 files changed, 5 insertions, 14 deletions
diff --git a/src/dhcp-manager/nm-dhcp-dhclient-utils.c b/src/dhcp-manager/nm-dhcp-dhclient-utils.c
index 8d4c54a..46876cb 100644
--- a/src/dhcp-manager/nm-dhcp-dhclient-utils.c
+++ b/src/dhcp-manager/nm-dhcp-dhclient-utils.c
@@ -112,7 +112,8 @@ add_ip4_config (GString *str, GBytes *client_id, const char *hostname, const cha
g_string_append (str, "; # added by NetworkManager\n");
}
- add_hostname4 (str, hostname, fqdn);
+ /* Workaround https://bugzilla.gnome.org/show_bug.cgi?id=768076 */
+ /* add_hostname4 (str, hostname, fqdn); */
g_string_append_c (str, '\n');
diff --git a/src/dhcp-manager/tests/test-dhcp-dhclient.c b/src/dhcp-manager/tests/test-dhcp-dhclient.c
index 77849c8..2f16db7 100644
--- a/src/dhcp-manager/tests/test-dhcp-dhclient.c
+++ b/src/dhcp-manager/tests/test-dhcp-dhclient.c
@@ -308,11 +308,7 @@ test_existing_ascii_client_id (void)
static const char *fqdn_expected = \
"# Created by NetworkManager\n"
- "\n"
- "send fqdn.fqdn \"foo.bar.com\"; # added by NetworkManager\n"
- "send fqdn.encoded on;\n"
- "send fqdn.server-update on;\n"
- "\n"
+ "\n\n"
"option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;\n"
"option ms-classless-static-routes code 249 = array of unsigned integer 8;\n"
"option wpad code 252 = string;\n"
@@ -343,11 +339,7 @@ static const char *fqdn_options_override_orig = \
static const char *fqdn_options_override_expected = \
"# Created by NetworkManager\n"
"# Merged from /path/to/dhclient.conf\n"
- "\n"
- "send fqdn.fqdn \"example2.com\"; # added by NetworkManager\n"
- "send fqdn.encoded on;\n"
- "send fqdn.server-update on;\n"
- "\n"
+ "\n\n"
"option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;\n"
"option ms-classless-static-routes code 249 = array of unsigned integer 8;\n"
"option wpad code 252 = string;\n"
@@ -382,9 +374,7 @@ static const char *override_hostname_orig = \
static const char *override_hostname_expected = \
"# Created by NetworkManager\n"
"# Merged from /path/to/dhclient.conf\n"
- "\n"
- "send host-name \"blahblah\"; # added by NetworkManager\n"
- "\n"
+ "\n\n"
"option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;\n"
"option ms-classless-static-routes code 249 = array of unsigned integer 8;\n"
"option wpad code 252 = string;\n"