From nobody@FreeBSD.org  Wed Mar 22 00:43:17 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 5DE0716A425
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 22 Mar 2006 00:43:17 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id ECED243D49
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 22 Mar 2006 00:43:16 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k2M0hGvZ081852
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 22 Mar 2006 00:43:16 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k2M0R5Tm076128;
	Wed, 22 Mar 2006 00:27:05 GMT
	(envelope-from nobody)
Message-Id: <200603220027.k2M0R5Tm076128@www.freebsd.org>
Date: Wed, 22 Mar 2006 00:27:05 GMT
From: "Devon H. O'Dell" <dodell@iXsystems.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] [sysinstall] Upping the network interface before dhclient in sysinstall
X-Send-Pr-Version: www-2.3

>Number:         94815
>Category:       bin
>Synopsis:       [patch] sysinstall(8): Upping the network interface before dhclient in sysinstall
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Mar 22 00:50:14 GMT 2006
>Closed-Date:    Mon Feb 04 17:04:04 UTC 2008
>Last-Modified:  Mon Feb 04 17:04:04 UTC 2008
>Originator:     Devon H. O'Dell
>Release:        6.0-RELEASE-p3
>Organization:
iXsystems
>Environment:
FreeBSD noisegen.iXsystems.com 6.0-RELEASE-p3 FreeBSD 6.0-RELEASE-p3 #0: Fri Jan 20 09:37:01 PST 2006     dodell@noisegen.iXsystems.com:/usr/obj/usr/src/sys/Q  i386

>Description:
There is a strange issue with the bge(4) driver under which some,
but not all bge(4) chipsets lose their link after being probed by
the driver. Indeed, this behavior doesn't even seem to affect all
the chips of the affected chipsets. While the rc scripts
explicitly up the interface before attempting to use dhclient on
them, sysinstall(8) does not. This is particularly annoying when
doing PXE-booted, NFS-based installations on a network with
addresses allocated via DHCP (as we have in our server assembly
network).

>How-To-Repeat:
Find a system that exhibits this issue (it's not that difficult:
I've come across about 15 out of 50 in the last month that do
this). Boot it with PXE. When sysinstall(8) asks if you'd like
to enable DHCP for the interface, say yes. Be astonished when
all fields come up blank. Lather. Rinse. Repeat.

>Fix:
This patch is also available at http://www.sitetronics.com/~dodell/sysinstall.diff in case this web submission has whitespace issues.

-- begin patch --
Index: tcpip.c
===================================================================
RCS file: /home/ncvs/src/usr.sbin/sysinstall/tcpip.c,v
retrieving revision 1.136
diff -u -r1.136 tcpip.c
--- tcpip.c     28 Feb 2006 21:49:32 -0000      1.136
+++ tcpip.c     21 Mar 2006 00:37:55 -0000
@@ -412,6 +412,13 @@
            Mkdir("/var/db");
            Mkdir("/var/run");
            Mkdir("/tmp");
+
+           /* XXX This is necessary for some bge(4) NICs when booting from
+            * PXE. It doesn't affect all of the chipsets, and moreover, it
+            * doesn't seem to affect all chips of the chipsets it does affect.
+            */
+           vsystem("ifconfig %s up", devp->name);
+
            msgNotify("Scanning for DHCP servers...");
            /* XXX clear any existing lease */
            /* XXX limit protocol to N tries */
-- end patch --
>Release-Note:
>Audit-Trail:
Could you try to reproduce this behaviour on HEAD or RELENG_6? Link-state
handling in bge driver was rewritten since 6.0R.

State-Changed-From-To: open->feedback 
State-Changed-By: matteo 
State-Changed-When: Lun 4 Feb 2008 17:00:40 UTC 
State-Changed-Why:  
Can you reproduce the problem in recent RELEASEs? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=94815 
State-Changed-From-To: feedback->closed 
State-Changed-By: matteo 
State-Changed-When: Lun 4 Feb 2008 17:03:36 UTC 
State-Changed-Why:  
Submitter's email address bounces 

http://www.freebsd.org/cgi/query-pr.cgi?pr=94815 
>Unformatted:
