From owner-svn-src-user@FreeBSD.ORG Mon Jan 28 12:50:17 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 8B64431F; Mon, 28 Jan 2013 12:50:17 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 64B23839; Mon, 28 Jan 2013 12:50:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0SCoH0u069796; Mon, 28 Jan 2013 12:50:17 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0SCoHd7069739; Mon, 28 Jan 2013 12:50:17 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201301281250.r0SCoHd7069739@svn.freebsd.org> From: Sean Bruno Date: Mon, 28 Jan 2013 12:50:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r246031 - user/sbruno/head_146698/sys/boot/i386/pxe_http X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jan 2013 12:50:17 -0000 Author: sbruno Date: Mon Jan 28 12:50:16 2013 New Revision: 246031 URL: http://svnweb.freebsd.org/changeset/base/246031 Log: Construct URL such that there is no // at the beginning of the request but still respect the contents of libstand::rootpath[] Update PXE_IP_WWW if we are using libstand code for bootp (at least that's what I think its doing here). Modified: user/sbruno/head_146698/sys/boot/i386/pxe_http/pxe_core.c user/sbruno/head_146698/sys/boot/i386/pxe_http/pxe_dhcp.c Modified: user/sbruno/head_146698/sys/boot/i386/pxe_http/pxe_core.c ============================================================================== --- user/sbruno/head_146698/sys/boot/i386/pxe_http/pxe_core.c Mon Jan 28 12:20:20 2013 (r246030) +++ user/sbruno/head_146698/sys/boot/i386/pxe_http/pxe_core.c Mon Jan 28 12:50:16 2013 (r246031) @@ -142,6 +142,17 @@ pxe_core_update_bootp() setenv("boot.nfsroot.server", inet_ntoa(tmp_in), 1); setenv("boot.nfsroot.path", rootpath, 1); #endif + /* removing '/' at tail of rootpath */ + size_t rlen = strlen(rootpath); + if ( (rlen > 0) && (rootpath[rlen - 1] == '/')) + rootpath[rlen - 1] = '\0'; + + /* check if Web server option specified, + * if not, make it equal to root ip + */ + if (pxe_get_ip(PXE_IP_WWW)->ip == 0) { + pxe_set_ip(PXE_IP_WWW, pxe_get_ip(PXE_IP_ROOT)); + } } /* pxe_core_init() - performs initialization of all PXE related code Modified: user/sbruno/head_146698/sys/boot/i386/pxe_http/pxe_dhcp.c ============================================================================== --- user/sbruno/head_146698/sys/boot/i386/pxe_http/pxe_dhcp.c Mon Jan 28 12:20:20 2013 (r246030) +++ user/sbruno/head_146698/sys/boot/i386/pxe_http/pxe_dhcp.c Mon Jan 28 12:50:16 2013 (r246031) @@ -441,6 +441,7 @@ pxe_dhcp_query(uint32_t xid) addr.ip = rootip.s_addr; pxe_set_ip(PXE_IP_ROOT, &addr); + pxe_set_ip(PXE_IP_WWW, &addr); /* "network route". direct connect for those addresses */ pxe_ip_route_add(pxe_get_ip(PXE_IP_MY), netmask, NULL);