[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dhclient problem (and fix?)
Hi Gabriel. your diff has a couple of things that a problematic
with it. Try this one instead and let me know if this works with your
broken dhcp server.
-Bob
Index: src/usr.sbin/dhcp/common/options.c
===================================================================
RCS file: /cvs/src/usr.sbin/dhcp/common/options.c,v
retrieving revision 1.3
diff -u -r1.3 options.c
--- src/usr.sbin/dhcp/common/options.c 2001/06/24 06:05:07 1.3
+++ src/usr.sbin/dhcp/common/options.c 2001/07/04 16:27:26
@@ -579,11 +579,13 @@
for (; dp < data + len; dp++) {
if (!isascii (*dp) ||
!isprint (*dp)) {
- snprintf (op, opleft, "\\%03o",
- *dp);
- op += 4;
- opleft -= 4;
-
+ if (dp + 1 != data + len ||
+ *dp != 0) {
+ snprintf(op, opleft,
+ "\\%03o", *dp);
+ op += 4;
+ opleft -= 4;
+ }
} else if (*dp == '"' ||
*dp == '\'' ||
*dp == '$' ||