Date: Sat, 13 Mar 1999 16:31:34 +0200 (EET) From: Juha Nurmela <junki@qn-lpr2-98.quicknet.inet.fi> To: FreeBSD-gnats-submit@freebsd.org Subject: bin/10568: dhcp client receives garbage (dhclient prepend) Message-ID: <199903131431.QAA04496@qn-lpr2-98.quicknet.inet.fi>
index | next in thread | raw e-mail
>Number: 10568
>Category: bin
>Synopsis: dhcp client receives garbage (dhclient prepend)
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sat Mar 13 06:40:01 PST 1999
>Closed-Date:
>Last-Modified:
>Originator: Juha Nurmela
>Release: FreeBSD 4.0-CURRENT i386
>Organization:
ACME Inc.
>Environment:
Internet Software Consortium DHCP Client V2.0b1pl17
Copyright 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium.
All rights reserved.
>Description:
Sometimes /etc/resolv.conf gets garbage to the 'search' line.
Looks like dhclient has trouble with the 'prepend' configuration
and string data.
>How-To-Repeat:
/etc/dhclient.conf:
interface ep0 {
prepend domain-name "z ";
prepend domain-name-servers 127.0.0.1;
script "nonexistent_just_testing_dhclient"
}
# dhclient -d -D ep0
Now files /tmp/dcs* might contain trash in new_domain_name variable.
Varying the length of the z above can reveal or hide the bug.
>Fix:
*** /usr/src/contrib/isc-dhcp/common/options.c.orig Wed Feb 10 11:10:13 1999
--- /usr/src/contrib/isc-dhcp/common/options.c Sat Mar 13 02:21:08 1999
***************
*** 518,525 ****
--- 518,530 ----
case 't':
if (emit_quotes)
*op++ = '"';
+ #if 0
strcpy (op, (char *)dp);
op += strlen ((char *)dp);
+ #else
+ while (len-- && *dp)
+ *op++ = *dp++;
+ #endif
if (emit_quotes)
*op++ = '"';
*op = 0;
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199903131431.QAA04496>
