diff options
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/bootpd/Problems | 46 | ||||
-rw-r--r-- | usr.sbin/bootpd/bootptab.5 | 37 | ||||
-rw-r--r-- | usr.sbin/bootpd/readfile.c | 9 |
3 files changed, 75 insertions, 17 deletions
diff --git a/usr.sbin/bootpd/Problems b/usr.sbin/bootpd/Problems index 9478676eca4..c74d1606681 100644 --- a/usr.sbin/bootpd/Problems +++ b/usr.sbin/bootpd/Problems @@ -45,3 +45,49 @@ not a fully specified path. :td=/tftpboot: (or) :hd=/usr/boot: (for example) +My HP Laserjet 4 gets an error during boot: "80 service (xxxx)" +Here is an explanation of the problem from a fellow at HP: + + Date: Mon, 16 Oct 95 10:16:29 MDT + From: James Clough <clough@hpbs3651.boi.hp.com> + Subject: Re: problems bootp-2.4.3 and JetDirect + To: bootp@andrew.cmu.edu + + > I installed bootp-2.4.3 with the DHCP-patches. + > All went oke, except the JetDirect cards, build in in + > several HP Laserjet 4's. They stopped while initialising + > with error message '80 service (01E0)' or + > '... (0009)'. The DUTH HP service support did not know + > what the error-message was. + + This problem has surfaced here more than once--each time with a + different hypothesized cause and proposed fix. + + The real cause of this problem is the byte alignment in the vendor + extensions portion of the bootp packet. Here are a few workarounds + that I've either used myself or heard tell of others using with + success: + + 1. Change the name of the printer. If the name in your + bootptab entry has an even number of characters, + change it to a name with an odd number of + characters. If it's odd, make it even. + + 2. Remove the logserver (lg) capability from the + bootptab entries for the affected printers. + + 3. Use the vendor sort patches posted here in June by + Ron Stanonik. They make bootpd sort the vendor + extensions into RFC numeric order. It just + so happens that this causes them to be aligned + correctly. + + Really, anything that changes the byte alignment in the vendor + tags section of the packet can work, including removing null + terminators from string capabilities. + + James Clough + -- + clough@boi.hp.com + +(Perhaps we need a "pad for alignment" option in bootpd. -gwr) diff --git a/usr.sbin/bootpd/bootptab.5 b/usr.sbin/bootpd/bootptab.5 index a76d449e918..ba9769de9c2 100644 --- a/usr.sbin/bootpd/bootptab.5 +++ b/usr.sbin/bootpd/bootptab.5 @@ -1,6 +1,6 @@ .\" Copyright (c) 1988, 1989, 1991 Carnegie Mellon University .\" -.\" $Header: /cvs/OpenBSD/src/usr.sbin/bootpd/Attic/bootptab.5,v 1.1 1995/10/18 08:47:26 deraadt Exp $ +.\" $Header: /cvs/OpenBSD/src/usr.sbin/bootpd/Attic/bootptab.5,v 1.2 1996/06/23 10:22:25 deraadt Exp $ .\" .TH BOOTPTAB 5 "October 31, 1991" "Carnegie Mellon University" .UC 6 @@ -19,17 +19,21 @@ in which two-character case-sensitive tag symbols are used to represent host parameters. These parameter declarations are separated by colons (:), with a general format of: .PP -.I " hostname:tg=value. . . :tg=value. . . :tg=value. . . ." +.I " hostname:tg=value:tg=value:tg=value:" .PP where .I hostname is the actual name of a bootp client (or a "dummy entry"), and .I tg -is a two-character tag symbol. Dummy entries have an invalid hostname +is a two-character tag symbol. Replies are returned to clients +only if an entry with the client's Ethernet or IP address exists +in the +.I booptab +file. Dummy entries have an invalid hostname (one with a "." as the first character) and are used to provide default values used by other entries via the .B tc=.dummy-entry -mechanism. Most tags must be followed by an equals-sign +mechanism. Most tags must be followed by an equal sign and a value as above. Some may also appear in a boolean form with no value (i.e. .RI : tg :). @@ -196,18 +200,27 @@ and symbols determine how the server fills in the bootfile field of the bootp reply packet. .PP -If the client provides a file name it is left as is. -Otherwise, if the +If the .B bf -option is specified its value is copied into the reply packet. +option is specified, its value is copied into the reply packet. +Otherwise, the name supplied in the client request is used. If the .B hd -option is specified as well, its value is prepended to the -boot file copied into the reply packet. -The existence of the boot file is checked only if the +option is specified, its value is prepended to the +boot file in the reply packet, otherwise the path +supplied in the client request is used. +The existence of the boot file is NOT verified by +.I bootpd +because the boot file may be on some other machine. +.PP +The +.B bs +option specified the size of the boot file. +It can be written as .BR bs =auto -option is used (to determine the boot file size). -A reply may be sent whether or not the boot file exists. +which causes +.I bootpd +to determine the boot file size automatically. .PP Some newer versions of .I tftpd diff --git a/usr.sbin/bootpd/readfile.c b/usr.sbin/bootpd/readfile.c index 41b4a5c0e13..a32739ea167 100644 --- a/usr.sbin/bootpd/readfile.c +++ b/usr.sbin/bootpd/readfile.c @@ -21,7 +21,7 @@ SOFTWARE. ************************************************************************/ #ifndef lint -static char rcsid[] = "$Id: readfile.c,v 1.1 1995/10/18 08:47:27 deraadt Exp $"; +static char rcsid[] = "$Id: readfile.c,v 1.2 1996/06/23 10:22:26 deraadt Exp $"; #endif @@ -446,7 +446,7 @@ readtab(force) if (hash_Insert(hwhashtable, hashcode, hwinscmp, hp, hp) < 0) { report(LOG_NOTICE, "duplicate %s address: %s", netname(hp->htype), - haddrtoa(hp->haddr, hp->htype)); + haddrtoa(hp->haddr, haddrlength(hp->htype))); free_host((hash_datum *) hp); continue; } @@ -796,7 +796,6 @@ eval_symbol(symbol, hp) { char tmpstr[MAXSTRINGLEN]; byte *tmphaddr; - struct shared_string *ss; struct symbolmap *symbolptr; u_int32 value; int32 timeoff; @@ -1271,7 +1270,7 @@ process_generic(src, dest, tagvalue) if ((*src)[0] == '"') { /* ASCII data */ newlength = sizeof(tmpbuf) - 2; /* Set maximum allowed length */ (void) get_string(src, (char *) str, &newlength); - newlength++; /* null terminator */ + /* Do NOT include the terminating null. */ } else { /* Numeric data */ newlength = 0; while (newlength < sizeof(tmpbuf) - 2) { @@ -1807,7 +1806,7 @@ prs_haddr(src, htype) hap = haddr; while (hap < haddr + hal) { - if (*p == '.') + if ((*p == '.') || (*p == ':')) p++; if (interp_byte(&p, hap++) < 0) { return NULL; |