From a65d8df916c918396d7fc98f36974cfc02bc7c42 Mon Sep 17 00:00:00 2001 From: Brooks Davis Date: Mon, 25 Jul 2005 22:19:09 +0000 Subject: [PATCH] Change host-name from type "X" to type "t". This allows the client to accept NUL-terminated strings as required by RFC 2132. This solution is not perfect as it removes the ability to send NUL-terminated host-name options which may be required by some broken servers. Given the current lack of an existance proof of such servers and the fact that servers that send NUL-terminated domain names do exist, this seems like an acceptable compromise. A discussion of these issues can be found at: http://marc.theaimsgroup.com/?l=dhcp-client&m=96837107208382&w=2 PR: bin/83468 Reported by: Sean Winn MFC-after: 3 days --- sbin/dhclient/tables.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sbin/dhclient/tables.c b/sbin/dhclient/tables.c index 6648756952c9..93ff6acce3df 100644 --- a/sbin/dhclient/tables.c +++ b/sbin/dhclient/tables.c @@ -1,4 +1,5 @@ /* $OpenBSD: tables.c,v 1.4 2004/05/04 20:28:40 deraadt Exp $ */ +/* $FreeBSD$ */ /* Tables of information... */ @@ -74,7 +75,7 @@ struct option dhcp_options[256] = { { "lpr-servers", "IA", &dhcp_universe, 9 }, { "impress-servers", "IA", &dhcp_universe, 10 }, { "resource-location-servers", "IA", &dhcp_universe, 11 }, - { "host-name", "X", &dhcp_universe, 12 }, + { "host-name", "t", &dhcp_universe, 12 }, { "boot-size", "S", &dhcp_universe, 13 }, { "merit-dump", "t", &dhcp_universe, 14 }, { "domain-name", "t", &dhcp_universe, 15 },