Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 May 2017 12:46:46 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r318990 - head/sys/boot/common
Message-ID:  <201705271246.v4RCkkoQ001046@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bapt
Date: Sat May 27 12:46:46 2017
New Revision: 318990
URL: https://svnweb.freebsd.org/changeset/base/318990

Log:
  Partially revert r314948
  
  While it sounds like a good idea to extract the RFC1048 data from PXE, in the
  end it is not and it is causing lots of issues.  Our pxeloader might need
  options which are incompatible with other pxe servers (for example iPXE, but
  not only).
  
  Our pxe loaders are also now settings their own user class, so it is useful to
  issue our own pxe request at startup
  
  Reviewed by:	tsoome
  Differential Revision:	https://reviews.freebsd.org/D10953

Modified:
  head/sys/boot/common/dev_net.c

Modified: head/sys/boot/common/dev_net.c
==============================================================================
--- head/sys/boot/common/dev_net.c	Sat May 27 12:35:01 2017	(r318989)
+++ head/sys/boot/common/dev_net.c	Sat May 27 12:46:46 2017	(r318990)
@@ -256,7 +256,6 @@ net_getparams(int sock)
 {
 	char buf[MAXHOSTNAMELEN];
 	n_long rootaddr, smask;
-	struct iodesc *d = socktodesc(sock);
 	extern struct in_addr servip;
 
 #ifdef	SUPPORT_BOOTP
@@ -266,26 +265,8 @@ net_getparams(int sock)
 	 * be initialized.  If any remain uninitialized, we will
 	 * use RARP and RPC/bootparam (the Sun way) to get them.
 	 */
-	if (try_bootp) {
-		int rc = -1;
-		if (bootp_response != NULL) {
-			rc = dhcp_try_rfc1048(bootp_response->bp_vend,
-			    bootp_response_size -
-			    offsetof(struct bootp, bp_vend));
-
-			if (servip.s_addr == 0)
-				servip = bootp_response->bp_siaddr;
-			if (rootip.s_addr == 0)
-				rootip = bootp_response->bp_siaddr;
-			if (gateip.s_addr == 0)
-				gateip = bootp_response->bp_giaddr;
-			if (myip.s_addr == 0)
-				myip = bootp_response->bp_yiaddr;
-			d->myip = myip;
-		}
-		if (rc < 0)
-			bootp(sock);
-	}
+	if (try_bootp)
+		bootp(sock);
 	if (myip.s_addr != 0)
 		goto exit;
 #ifdef	NETIF_DEBUG



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