Date: Mon, 14 Jun 1999 07:17:44 -0700 (PDT) From: jobaldwi@vt.edu To: freebsd-gnats-submit@freebsd.org Subject: bin/12205: [PATCH] DHCP client does not set hostnames, and garbles them as well Message-ID: <19990614141744.3A34015349@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 12205 >Category: bin >Synopsis: [PATCH] DHCP client does not set hostnames, and garbles them as well >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jun 14 07:20:01 PDT 1999 >Closed-Date: >Last-Modified: >Originator: John Baldwin >Release: 3.2-STABLE >Organization: >Environment: FreeBSD xxxxxxx.xxxxx.vt.edu 3.2-STABLE FreeBSD 3.2-STABLE #2: Sat Jun 5 18:57: 30 EDT 1999 root@xxxxxxx.xxxxx.vt.edu:/usr/source/src/sys/compile/SNOWCOW i 386 >Description: The dhcp client in /usr/src/contrib/isc-dhcp does not support setting hostnames. Also, it currently sets the hostname to a hexadecimal representation of the hostname instead of the actual text. (Sigh.) >How-To-Repeat: Well, you need a dhcp server setup that sends hostnames, and a client that requests hostnames. Then, boot the system. The hostname will not be set. Then, apply the first patch to /usr/src/contrib/isc-dhcp/clients/scripts/freebsd and the hostname will be set to a long, annoying, hex string. Finally, apply the second patch to /usr/src/contrib/isc-dhcp/common/tables.c and the hostname will be set properly. >Fix: This is a patch to /usr/src/contrib/isc-dhcp/client/scripts/freebsd: Index: freebsd =================================================================== RCS file: /src/cvs/src/contrib/isc-dhcp/client/scripts/freebsd,v retrieving revision 1.1.1.2.2.3 diff -r1.1.1.2.2.3 freebsd 32a33,41 > if [ x$new_host_name != x ]; then > $LOGGER New Host Name: $new_host_name > new_host_name_arg=$new_host_name > fi > > if [ x$old_host_name != x ]; then > old_host_name_arg=$old_host_name > fi > 82a92,96 > if [ x$old_host_name = x ] || \ > [ x$old_host_name != x$new_host_name ] || \ > [ x$reason = xBOUND ] || [x$reason = xREBOOT]; then > hostname "$new_host_name_arg" > fi 159a174 > hostname $new_host_name_arg This is a patch to /usr/src/contrib/isc-dhcp/common/tables.c: Index: tables.c =================================================================== RCS file: /src/cvs/src/contrib/isc-dhcp/common/tables.c,v retrieving revision 1.1.1.2.2.2 diff -r1.1.1.2.2.2 tables.c 81c81 < { "host-name", "X", &dhcp_universe, 12 }, --- > { "host-name", "t", &dhcp_universe, 12 }, >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990614141744.3A34015349>