Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Mar 2006 00:27:05 GMT
From:      "Devon H. O'Dell" <dodell@iXsystems.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   bin/94815: [patch] [sysinstall] Upping the network interface before dhclient in sysinstall
Message-ID:  <200603220027.k2M0R5Tm076128@www.freebsd.org>
Resent-Message-ID: <200603220050.k2M0oEX5047993@freefall.freebsd.org>

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

>Number:         94815
>Category:       bin
>Synopsis:       [patch] [sysinstall] Upping the network interface before dhclient in sysinstall
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Mar 22 00:50:14 GMT 2006
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:



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