From owner-svn-src-all@FreeBSD.ORG Wed Oct 9 21:33:19 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id EC505C7B; Wed, 9 Oct 2013 21:33:19 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D9FFE27C6; Wed, 9 Oct 2013 21:33:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r99LXJ4u043583; Wed, 9 Oct 2013 21:33:19 GMT (envelope-from kan@svn.freebsd.org) Received: (from kan@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r99LXJVK043582; Wed, 9 Oct 2013 21:33:19 GMT (envelope-from kan@svn.freebsd.org) Message-Id: <201310092133.r99LXJVK043582@svn.freebsd.org> From: Alexander Kabaev Date: Wed, 9 Oct 2013 21:33:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r256244 - head/lib/libstand 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.14 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: Wed, 09 Oct 2013 21:33:20 -0000 Author: kan Date: Wed Oct 9 21:33:19 2013 New Revision: 256244 URL: http://svnweb.freebsd.org/changeset/base/256244 Log: Unbreak zfsloader with LOADER_TFTP_SUPPORT on Only accept 'net' and 'pxe' devices as underlying transport in tftp.c on x86. Prior to this change tftp code would attempt to send packets over any boot device, including zfs one with predictably sad results. Approved by: re (gjb) MFC After: 1 month Modified: head/lib/libstand/tftp.c Modified: head/lib/libstand/tftp.c ============================================================================== --- head/lib/libstand/tftp.c Wed Oct 9 21:03:34 2013 (r256243) +++ head/lib/libstand/tftp.c Wed Oct 9 21:33:19 2013 (r256244) @@ -400,10 +400,14 @@ tftp_open(const char *path, struct open_ struct iodesc *io; int res; -#ifndef __i386__ - if (strcmp(f->f_dev->dv_name, "net") != 0) + if (strcmp(f->f_dev->dv_name, "net") != 0) { +#ifdef __i386__ + if (strcmp(f->f_dev->dv_name, "pxe") != 0) + return (EINVAL); +#else return (EINVAL); #endif + } if (is_open) return (EBUSY);