Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Oct 2013 21:33:19 +0000 (UTC)
From:      Alexander Kabaev <kan@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r256244 - head/lib/libstand
Message-ID:  <201310092133.r99LXJVK043582@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



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