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);
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to