aboutsummaryrefslogtreecommitdiff
path: root/contrib/isc-dhcp/common
diff options
context:
space:
mode:
authorDavid E. O'Brien <obrien@FreeBSD.org>2000-11-04 20:14:55 +0000
committerDavid E. O'Brien <obrien@FreeBSD.org>2000-11-04 20:14:55 +0000
commit7657fb140fbd218ea326d55bd3c43c4077f03d9a (patch)
treed18b862b9b680f6a3517a4d5b93c414841a12a47 /contrib/isc-dhcp/common
parent33abda25acceba8682b4be475aa024ffee98318a (diff)
downloadsrc-7657fb140fbd218ea326d55bd3c43c4077f03d9a.tar.gz
src-7657fb140fbd218ea326d55bd3c43c4077f03d9a.zip
Import Patchlevel 5 of the ISC 2.0 dhcp client plus bug fixes from the
beta ISC DHCP version 3 offering. In message http://www.isc.org/ml-archives/dhcp-client/2000/10/msg00001.html author Ted Lemon stated "This will not be fixed in any 2.0 release - 2.0 is no longer being maintained." to a reported problem about an interoperability problem against Microsoft servers. FreeBSD went with the ISC client vs. the WIDE client because others convinced me it was better supported. Sigh. I wonder if version 3 will get the same treatment after its release... Since FreeBSD generally uses only released contrib products and the ISC version 3 offering is still in beta, our backs are up against the wall. The common/options.c rev 1.65 work around for erroneous Microsoft DHCP servers has been back ported to the version 2.0pl5 client. Since this comes from a change in the vendor's own code (and would no doubt also be committed to the version 2 client if the author were still supporting it), we will consider this a vendor release and import this as such. PR: 21658 Submitted by: Motomichi Matsuzaki <mzaki@e-mail.ne.jp>
Notes
Notes: svn path=/vendor/isc-dhcp/dist/; revision=68325
Diffstat (limited to 'contrib/isc-dhcp/common')
-rw-r--r--contrib/isc-dhcp/common/options.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/contrib/isc-dhcp/common/options.c b/contrib/isc-dhcp/common/options.c
index b80ffa1fb47e..b840716f345a 100644
--- a/contrib/isc-dhcp/common/options.c
+++ b/contrib/isc-dhcp/common/options.c
@@ -553,9 +553,13 @@ char *pretty_print_option (code, data, len, emit_commas, emit_quotes)
for (; dp < data + len; dp++) {
if (!isascii (*dp) ||
!isprint (*dp)) {
- sprintf (op, "\\%03o",
- *dp);
- op += 4;
+ /* Skip trailing NUL. */
+ if (dp + 1 != data + len ||
+ *dp != 0) {
+ sprintf (op, "\\%03o",
+ *dp);
+ op += 4;
+ }
} else if (*dp == '"' ||
*dp == '\'' ||
*dp == '$' ||