From owner-freebsd-bugs Fri Jan 16 14:10:06 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA00563 for freebsd-bugs-outgoing; Fri, 16 Jan 1998 14:10:06 -0800 (PST) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: (from gnats@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA00555; Fri, 16 Jan 1998 14:10:02 -0800 (PST) (envelope-from gnats) Received: from mailgate.spa.is.uec.ac.jp (ns.spa.is.uec.ac.jp [130.153.67.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA00305 for ; Fri, 16 Jan 1998 14:04:56 -0800 (PST) (envelope-from tate@spa.is.uec.ac.jp) Received: from trunk.tate.spa.is.uec.ac.jp by mailgate.spa.is.uec.ac.jp (8.8.8+2.7Wbeta7/3.3W9+spa-1.4d) id HAA16831; Sat, 17 Jan 1998 07:04:43 +0900 (JST) Received: from mulch.tate.spa.is.uec.ac.jp (mulch.local [192.168.0.4]) by trunk.tate.spa.is.uec.ac.jp (8.8.5/3.6Wbeta7/trunk-19971218a) with ESMTP id HAA16244 for ; Sat, 17 Jan 1998 07:02:32 +0900 (JST) Received: (from tate@localhost) by mulch.tate.spa.is.uec.ac.jp (8.8.7/3.5Wpl4/mulch-19970724) id HAA00717; Sat, 17 Jan 1998 07:01:21 GMT Message-Id: <199801170701.HAA00717@mulch.tate.spa.is.uec.ac.jp> Date: Sat, 17 Jan 1998 07:01:21 GMT From: tate@spa.is.uec.ac.jp Reply-To: tate@spa.is.uec.ac.jp To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: i386/5512: netboot can't accept standard BOOTP reply Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 5512 >Category: i386 >Synopsis: netboot can't accept standard BOOTP reply >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: Fri Jan 16 14:10:01 PST 1998 >Last-Modified: >Originator: TATEOKA Takamichi >Organization: University of Electro-Communications >Release: FreeBSD 2.2.5-RELEASE i386 >Environment: Client: FreeBSD-2.2.5-RELEASE i386 with NE2000 ethernet card. Server: BSD/OS 2.1 with WIDE dhcp-1.3beta. >Description: I386 netboot can not receive standard BOOTP message from BOOTP server. This is tested on nb8390.com, however the problem is not depend on hardware. >How-To-Repeat: Configure BOOTP server (WIDE dhcp-1.3beta on BSD/OS 2.1) as: mulch: :ipad=192.168.0.4:clid="1:0x00605204a360":\ :albp=true:siad=192.168.0.1: This configuration serve to BOOTP client, which has ethernet address "00:60:52:04:a3:60", client IP addrss (192.168.0.4) and server IP address (192.168.0.1). Compile nb8390.com and run it under DOS on FreeBSD box with NE2000. This box can't receive any BOOTP reply message even when BOOTP server is sending valid reply. >Fix: In function await_reply() on /usr/src/sys/i386/boot/netboot/main.c, BOOTP reply message length is checked as: (packetlen >= (ETHER_HDR_LEN + sizeof(struct bootp_t)) According to RFC1048, BOOTP reply message is: Ethernet header ... 14 byte IP header ... 20 byte UDP header ... 8 byte BOOTP message ... 300 byte => total = 342 byte. However, sizeof(struct bootp_t) is 520 in released code. This is came from BOOTP_VENDOR_LEN is defined 256 instead of 64. This value is limited to 64 byte in BOOTP message. Then, BOOTP reply message (342 byte) is dropped as short message and client never receive any reply. Following is patch for: /usr/src/sys/i386/boot/netboot/netboot.h *** netboot.h.DIST Wed May 14 11:47:45 1997 --- netboot.h Sat Jan 17 05:37:09 1998 *************** *** 109,115 **** #define RFC1048_SWAP_LEN 129 /* T129 */ #define RFC1048_END 255 ! #define BOOTP_VENDOR_LEN 256 #define TFTP_RRQ 1 #define TFTP_WRQ 2 --- 109,115 ---- #define RFC1048_SWAP_LEN 129 /* T129 */ #define RFC1048_END 255 ! #define BOOTP_VENDOR_LEN 64 #define TFTP_RRQ 1 #define TFTP_WRQ 2 >Audit-Trail: >Unformatted: