Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Jan 1998 07:01:21 GMT
From:      tate@spa.is.uec.ac.jp
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   i386/5512: netboot can't accept standard BOOTP reply
Message-ID:  <199801170701.HAA00717@mulch.tate.spa.is.uec.ac.jp>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199801170701.HAA00717>