From owner-freebsd-bugs Fri Sep 29 23:10: 7 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id BC30737B502 for ; Fri, 29 Sep 2000 23:10:01 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id XAA26156; Fri, 29 Sep 2000 23:10:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: by hub.freebsd.org (Postfix, from userid 32767) id 1C4B337B66C; Fri, 29 Sep 2000 23:02:37 -0700 (PDT) Message-Id: <20000930060237.1C4B337B66C@hub.freebsd.org> Date: Fri, 29 Sep 2000 23:02:37 -0700 (PDT) From: mzaki@e-mail.ne.jp To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: bin/21658: The combination of dhclient & WinNT server makes resolv.conf useless Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 21658 >Category: bin >Synopsis: The combination of dhclient & WinNT server makes resolv.conf useless >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Sep 29 23:10:01 PDT 2000 >Closed-Date: >Last-Modified: >Originator: Motomichi Matsuzaki >Release: FreeBSD 5.0-CURRENT >Organization: >Environment: FreeBSD localhost 5.0-CURRENT FreeBSD 5.0-CURRENT #9: Fri Sep 29 20:10:03 JST 2000 root@localhost:/usr/obj/usr/src/sys/WORK i386 >Description: As servicing DHCP on Windows NT, dhclient received the domain name and setting weirdly to /etc/resolv.conf For example: search mzaki.nom\000 nameserver 192.168.177.2 >How-To-Repeat: setup Windows NT as DHCP server, run dhclient on FreeBSD, see /etc/resolv.conf >Fix: RFC2132 says: Options containing NVT ASCII data SHOULD NOT include a trailing NULL; however, the receiver of such options MUST be prepared to delete trailing nulls if they exist. (RFC2132 2. BOOTP Extension/DHCP Option Field Format) isc-dhcp 2.0pl5 client seems to violate this. If server send domain name with a trailing NULL as follows, 0f 0a 6d 7a 61 6b 69 2e 6e 6f 6d 00 | | | | | value: mzaki.nom\0 ( this '\0' stands for NUL character ) | length: 10 tag: Domain Name pretty_print_option() in common/options.c translates this into mzaki.nom\000 and turns over to client script. ad hoc patch is: --- common/options.c Sat Jun 24 16:24:02 2000 +++ /home/mzaki/options.c Mon Sep 11 23:08:56 2000 @@ -551,6 +551,7 @@ if (emit_quotes) *op++ = '"'; for (; dp < data + len; dp++) { + if (*dp == '\0') continue; if (!isascii (*dp) || !isprint (*dp)) { sprintf (op, "\\%03o", >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message