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
This commit is contained in:
parent
772f66457a
commit
b13ba46dbf
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=256244
@ -400,10 +400,14 @@ tftp_open(const char *path, struct open_file *f)
|
|||||||
struct iodesc *io;
|
struct iodesc *io;
|
||||||
int res;
|
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);
|
return (EINVAL);
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
if (is_open)
|
if (is_open)
|
||||||
return (EBUSY);
|
return (EBUSY);
|
||||||
|
Loading…
Reference in New Issue
Block a user