From ruan@univ.kiev.ua  Fri Dec  8 19:57:34 2006
Return-Path: <ruan@univ.kiev.ua>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 9F06316A47E
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  8 Dec 2006 19:57:34 +0000 (UTC)
	(envelope-from ruan@univ.kiev.ua)
Received: from mail.univ.kiev.ua (mail.univ.kiev.ua [193.125.78.122])
	by mx1.FreeBSD.org (Postfix) with ESMTP id BA6DF43C9D
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  8 Dec 2006 19:56:34 +0000 (GMT)
	(envelope-from ruan@univ.kiev.ua)
Received: from [10.25.0.21] (helo=localhost)
	by mail.univ.kiev.ua with esmtp (Exim 4.60)
	(envelope-from <ruan@univ.kiev.ua>)
	id 1GslrW-0003Ye-AX; Fri, 08 Dec 2006 21:58:31 +0200
Message-Id: <20061208195634.BA6DF43C9D@mx1.FreeBSD.org>
Date: Fri, 8 Dec 2006 21:52:07 +0200 (EET)
From: Andrey Russev <ruan@univ.kiev.ua>
Reply-To: Andrey Russev <ruan@univ.kiev.ua>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [ patch ] pxeboot uses /pxeroot instead of /
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         106493
>Category:       i386
>Synopsis:       [patch] pxeboot(8) uses /pxeroot instead of /
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    emaste
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Dec 08 20:00:25 GMT 2006
>Closed-Date:    Mon Nov 02 16:52:29 UTC 2009
>Last-Modified:  Mon Nov  2 17:00:18 UTC 2009
>Originator:     Andrey Russev
>Release:        FreeBSD 6.0-RELEASE-p15 i386
>Organization:
>Environment:
System: FreeBSD 6.0-RELEASE-p15 i386

isc-dhcp3-server-3.0.3
	
>Description:
When boot server exports its own root as a rootpath to the client,
the latter falls back to /pxeroot
	
>How-To-Repeat:
1. Enable tftpd
2. Copy /boot/pxeboot to the tftpd root (/tftpboot/)
3. Add lines
  filename "pxeboot";
  option root-path "/";
to the dhcpd.conf
4. Restart dhcpd
5. Try to boot some machine over the network
	
>Fix:
Workaround:
  option root-path "//";

	

--- pxe.c.diff begins here ---
--- pxe.c	Mon Apr 18 00:38:22 2005
+++ /tmp/pxe.c	Thu Dec  7 19:06:14 2006
@@ -282,7 +282,7 @@
 		bootp(pxe_sock, BOOTP_PXE);
 		if (rootip.s_addr == 0)
 			rootip.s_addr = bootplayer.sip;
-		if (!rootpath[1])
+		if (!rootpath[0])
 			strcpy(rootpath, PXENFSROOTPATH);
 
 		for (i = 0; rootpath[i] != '\0' && i < FNAME_SIZE; i++)
--- pxe.c.diff ends here ---



>Release-Note:
>Audit-Trail:

From: Jonas Nagel <fireball@zerouptime.ch>
To: bug-followup@FreeBSD.org,
 ruan@univ.kiev.ua,
 freebsd-i386@FreeBSD.org
Cc:  
Subject: Re: i386/106493: [patch] pxeboot(8) uses /pxeroot instead of /
Date: Mon, 24 Sep 2007 01:35:04 +0200

 Hello? Anybody out there to commit the easy patch to the tree? Browsing
 through GNATS searching for 'pxeboot' I just found quite a few PRs with
 patches, which nobody bothered to implement or whatsoever. All of it is
 still not fixed for -STABLE.
 
 
 - Jonas
 
Responsible-Changed-From-To: freebsd-i386->ps 
Responsible-Changed-By: ru 
Responsible-Changed-When: Mon Sep 24 07:42:25 UTC 2007 
Responsible-Changed-Why:  
Paul, the patch in the PR looks good to me.  Could you please 
either commit it or re-assign it back to me if you don't have 
time for it now? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=106493 
Responsible-Changed-From-To: ps->ru 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sun Mar 30 18:46:26 UTC 2008 
Responsible-Changed-Why:  
With bugmeister hat on, reassigning back to ru@ who had earlier 
requested it. 

Reminded by:	brucec 

http://www.freebsd.org/cgi/query-pr.cgi?pr=106493 
Responsible-Changed-From-To: ru->emaste 
Responsible-Changed-By: emaste 
Responsible-Changed-When: Fri Jul 24 02:56:56 UTC 2009 
Responsible-Changed-Why:  
Grab PR; I just ran into this :(  I'll commit this after the 8.0 freeze. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=106493 
State-Changed-From-To: open->patched 
State-Changed-By: emaste 
State-Changed-When: Thu Sep 10 22:00:59 UTC 2009 
State-Changed-Why:  
Committed to HEAD. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=106493 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: i386/106493: commit references a PR
Date: Thu, 10 Sep 2009 22:05:57 +0000 (UTC)

 Author: emaste
 Date: Thu Sep 10 22:05:43 2009
 New Revision: 197082
 URL: http://svn.freebsd.org/changeset/base/197082
 
 Log:
   If the pxe client is told to use / as the root path, honour that rather
   of trying to mount /pxeroot instead.
   
   PR:		i386/106493
   Submitted by:	Andrey Russev
   MFC after:	1 month
 
 Modified:
   head/sys/boot/i386/libi386/pxe.c
 
 Modified: head/sys/boot/i386/libi386/pxe.c
 ==============================================================================
 --- head/sys/boot/i386/libi386/pxe.c	Thu Sep 10 21:42:00 2009	(r197081)
 +++ head/sys/boot/i386/libi386/pxe.c	Thu Sep 10 22:05:43 2009	(r197082)
 @@ -282,7 +282,7 @@ pxe_open(struct open_file *f, ...)
  		bootp(pxe_sock, BOOTP_PXE);
  		if (rootip.s_addr == 0)
  			rootip.s_addr = bootplayer.sip;
 -		if (!rootpath[1])
 +		if (!rootpath[0])
  			strcpy(rootpath, PXENFSROOTPATH);
  
  		for (i = 0; rootpath[i] != '\0' && i < FNAME_SIZE; i++)
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: emaste 
State-Changed-When: Mon Nov 2 16:50:01 UTC 2009 
State-Changed-Why:  
Merged to 8, 7, and 6 now.  Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=106493 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: i386/106493: commit references a PR
Date: Mon,  2 Nov 2009 16:46:16 +0000 (UTC)

 Author: emaste
 Date: Mon Nov  2 16:46:06 2009
 New Revision: 198806
 URL: http://svn.freebsd.org/changeset/base/198806
 
 Log:
   MFC r197082:
   
   If the pxe client is told to use / as the root path, honour that rather
   of trying to mount /pxeroot instead.
   
   PR:		i386/106493
   Submitted by:	Andrey Russev
 
 Modified:
   stable/8/sys/   (props changed)
   stable/8/sys/amd64/include/xen/   (props changed)
   stable/8/sys/boot/i386/libi386/pxe.c
   stable/8/sys/cddl/contrib/opensolaris/   (props changed)
   stable/8/sys/contrib/dev/acpica/   (props changed)
   stable/8/sys/contrib/pf/   (props changed)
   stable/8/sys/dev/xen/xenpci/   (props changed)
 
 Modified: stable/8/sys/boot/i386/libi386/pxe.c
 ==============================================================================
 --- stable/8/sys/boot/i386/libi386/pxe.c	Mon Nov  2 16:32:32 2009	(r198805)
 +++ stable/8/sys/boot/i386/libi386/pxe.c	Mon Nov  2 16:46:06 2009	(r198806)
 @@ -282,7 +282,7 @@ pxe_open(struct open_file *f, ...)
  		bootp(pxe_sock, BOOTP_PXE);
  		if (rootip.s_addr == 0)
  			rootip.s_addr = bootplayer.sip;
 -		if (!rootpath[1])
 +		if (!rootpath[0])
  			strcpy(rootpath, PXENFSROOTPATH);
  
  		for (i = 0; rootpath[i] != '\0' && i < FNAME_SIZE; i++)
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: i386/106493: commit references a PR
Date: Mon,  2 Nov 2009 16:47:02 +0000 (UTC)

 Author: emaste
 Date: Mon Nov  2 16:46:53 2009
 New Revision: 198807
 URL: http://svn.freebsd.org/changeset/base/198807
 
 Log:
   MFC r197082:
   
     If the pxe client is told to use / as the root path, honour that rather
     of trying to mount /pxeroot instead.
   
   PR:		i386/106493
   Submitted by:	Andrey Russev
 
 Modified:
   stable/7/sys/   (props changed)
   stable/7/sys/boot/i386/libi386/pxe.c
   stable/7/sys/contrib/pf/   (props changed)
 
 Modified: stable/7/sys/boot/i386/libi386/pxe.c
 ==============================================================================
 --- stable/7/sys/boot/i386/libi386/pxe.c	Mon Nov  2 16:46:06 2009	(r198806)
 +++ stable/7/sys/boot/i386/libi386/pxe.c	Mon Nov  2 16:46:53 2009	(r198807)
 @@ -282,7 +282,7 @@ pxe_open(struct open_file *f, ...)
  		bootp(pxe_sock, BOOTP_PXE);
  		if (rootip.s_addr == 0)
  			rootip.s_addr = bootplayer.sip;
 -		if (!rootpath[1])
 +		if (!rootpath[0])
  			strcpy(rootpath, PXENFSROOTPATH);
  
  		for (i = 0; rootpath[i] != '\0' && i < FNAME_SIZE; i++)
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: i386/106493: commit references a PR
Date: Mon,  2 Nov 2009 16:50:16 +0000 (UTC)

 Author: emaste
 Date: Mon Nov  2 16:49:57 2009
 New Revision: 198808
 URL: http://svn.freebsd.org/changeset/base/198808
 
 Log:
   MFC r197082:
   
     If the pxe client is told to use / as the root path, honour that rather
     of trying to mount /pxeroot instead.
   
   PR:		i386/106493
   Submitted by:	Andrey Russev
 
 Modified:
   stable/6/sys/   (props changed)
   stable/6/sys/boot/i386/libi386/pxe.c
   stable/6/sys/conf/   (props changed)
   stable/6/sys/contrib/pf/   (props changed)
   stable/6/sys/dev/cxgb/   (props changed)
 
 Modified: stable/6/sys/boot/i386/libi386/pxe.c
 ==============================================================================
 --- stable/6/sys/boot/i386/libi386/pxe.c	Mon Nov  2 16:46:53 2009	(r198807)
 +++ stable/6/sys/boot/i386/libi386/pxe.c	Mon Nov  2 16:49:57 2009	(r198808)
 @@ -282,7 +282,7 @@ pxe_open(struct open_file *f, ...)
  		bootp(pxe_sock, BOOTP_PXE);
  		if (rootip.s_addr == 0)
  			rootip.s_addr = bootplayer.sip;
 -		if (!rootpath[1])
 +		if (!rootpath[0])
  			strcpy(rootpath, PXENFSROOTPATH);
  
  		for (i = 0; rootpath[i] != '\0' && i < FNAME_SIZE; i++)
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
>Unformatted:
