mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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
1 changed files with 6 additions and 2 deletions
|
|
@ -400,10 +400,14 @@ tftp_open(const char *path, struct open_file *f)
|
|||
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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue