From owner-svn-src-all@freebsd.org Sat May 27 12:46:47 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D8C9D858DD; Sat, 27 May 2017 12:46:47 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F8DE1D94; Sat, 27 May 2017 12:46:47 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4RCkkbl001047; Sat, 27 May 2017 12:46:46 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4RCkkoQ001046; Sat, 27 May 2017 12:46:46 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201705271246.v4RCkkoQ001046@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 27 May 2017 12:46:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318990 - head/sys/boot/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 12:46:47 -0000 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