Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Sep 2000 23:02:37 -0700 (PDT)
From:      mzaki@e-mail.ne.jp
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   bin/21658: The combination of dhclient & WinNT server makes resolv.conf useless
Message-ID:  <20000930060237.1C4B337B66C@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000930060237.1C4B337B66C>