bin/83468: imported OpenBSD dhclient handles hostnames
differently to ISC DHCP 3 - come through as hex
Sean Winn
sean at gothic.net.au
Thu Jul 14 23:50:22 GMT 2005
The following reply was made to PR bin/83468; it has been noted by GNATS.
From: Sean Winn <sean at gothic.net.au>
To: bug-followup at FreeBSD.org
Cc:
Subject: Re: bin/83468: imported OpenBSD dhclient handles hostnames differently to ISC DHCP 3 - come through as hex
Date: Fri, 15 Jul 2005 09:49:02 +1000
What's missing is the patch (also on
http://www.gothic.net.au/~sean/dhclient-options.c.patch ) ...
Index: sbin/dhclient/options.c
===================================================================
RCS file: /home/ncvs/src/sbin/dhclient/options.c,v
retrieving revision 1.1.1.1
diff -u -u -r1.1.1.1 options.c
--- sbin/dhclient/options.c 7 Jun 2005 04:05:08 -0000 1.1.1.1
+++ sbin/dhclient/options.c 14 Jul 2005 16:09:27 -0000
@@ -486,7 +486,11 @@
if (!isascii(data[k]) ||
!isprint(data[k]))
break;
- if (k == len) {
+ /* If we found no bogus characters, or the bogus
+ character we found is a trailing NUL, it's
+ okay to print this option as text. */
+
+ if (k == len || (k + 1 == len && data [k] ==
0)) {
fmtbuf[i] = 't';
numhunk = -2;
} else {
More information about the freebsd-bugs
mailing list