From joost@jodocus.org  Wed Nov 29 19:39:16 2006
Return-Path: <joost@jodocus.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 0480916A47B
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 29 Nov 2006 19:39:16 +0000 (UTC)
	(envelope-from joost@jodocus.org)
Received: from amsfep17-int.chello.nl (amsfep19-int.chello.nl [213.46.243.16])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 83D2443CA7
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 29 Nov 2006 19:38:13 +0000 (GMT)
	(envelope-from joost@jodocus.org)
Received: from bps.jodocus.org ([89.98.153.102]) by amsfep17-int.chello.nl
          (InterMail vM.6.01.04.04 201-2131-118-104-20050224) with ESMTP
          id <20061129193754.FKEG10644.amsfep17-int.chello.nl@bps.jodocus.org>
          for <FreeBSD-gnats-submit@freebsd.org>;
          Wed, 29 Nov 2006 20:37:54 +0100
Received: from jodocus.org (localhost [127.0.0.1])
	by bps.jodocus.org (8.13.6/8.13.6) with ESMTP id kATJbqsk015479
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 29 Nov 2006 20:37:52 +0100 (CET)
	(envelope-from joost@jodocus.org)
Received: (from joost@localhost)
	by jodocus.org (8.13.6/8.13.6/Submit) id kATJbqih015478;
	Wed, 29 Nov 2006 20:37:52 +0100 (CET)
	(envelope-from joost)
Message-Id: <200611291937.kATJbqih015478@jodocus.org>
Date: Wed, 29 Nov 2006 20:37:52 +0100 (CET)
From: Joost Bekkers <joost@jodocus.org>
Reply-To: Joost Bekkers <joost@jodocus.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: tftp inside pxeboot isn't initialised properly
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         106028
>Category:       kern
>Synopsis:       [pxeboot] tftp inside pxeboot isn't initialised properly
>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:   Wed Nov 29 19:40:22 GMT 2006
>Closed-Date:    
>Last-Modified:  Thu May 01 05:54:07 UTC 2008
>Originator:     Joost Bekkers
>Release:        FreeBSD 6.1-RELEASE i386
>Organization:
>Environment:
System: FreeBSD bps.jodocus.org 6.1-RELEASE FreeBSD 6.1-RELEASE #1: Sun Oct 1 19:21:38 CEST 2006 root@bps.jodocus.org:/usr/src/sys/i386/compile/bps i386

>Description:

If on the first call to pxe_open rootip is already set (probably because of
information in bootplayer) the bootp/dhcp routine in libstand never get
executed. (see src/sys/boot/i386/libi386/pxe.c:275)

This bootp routine s the only place that sets servip (defined in bootp.c)
which is used by the tftp client in libstand. Any attempt to use tftp
will cause tftp-requests to go to 0.0.0.0

This doesn't seem to happen on all systems, so it's probably dependent on
the pxe implementation on the nic/motherboard. I'm experiencing this problem
on a dell optiplex gx150

>How-To-Repeat:

build pxeboot with -DLOADER_TFTP_SUPPORT
try to boot.


>Fix:

If somebody can point me in the right direction of 'the right thing(tm)',
I'll be happy to supply a patch. I've got a workaround, but I think the
code is feeling violated.

>Release-Note:
>Audit-Trail:
>Unformatted:
